diff --git a/.buildkite/run-repository.sh b/.buildkite/run-repository.sh index e5361f05c2..6ab4ae6c04 100644 --- a/.buildkite/run-repository.sh +++ b/.buildkite/run-repository.sh @@ -41,7 +41,7 @@ ELASTICSEARCH_BUILD_VERSION=$(curl -sSk $external_elasticsearch_url | jq -r '.ve ELASTICSEARCH_BUILD_HASH=$(curl -sSk $external_elasticsearch_url | jq -r '.version.build_hash') echo -e "\033[34;1mINFO:\033[0m Download Elasticsearch specs... \033[0m" -docker run --volume=$WORKSPACE/tmp:/tmp --workdir=/go-elasticsearch/internal/build --rm elastic/go-elasticsearch /bin/sh -c " +docker run -e ELASTICSEARCH_BUILD_VERSION=$ELASTICSEARCH_BUILD_VERSION --volume=$WORKSPACE/tmp:/tmp --workdir=/go-elasticsearch/internal/build --rm elastic/go-elasticsearch /bin/sh -c " go mod download go run main.go download-spec -o /tmp -d " diff --git a/CHANGELOG.md b/CHANGELOG.md index a213219b6a..6b448d4073 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,35 @@ +# 9.1.0 + +# API + +* Updated APIs to 9.1.0 + +# Typed API + +* Update TypedAPI to latest [elasticsearch-specification 9.1](https://github.com/elastic/elasticsearch-specification/commit/907d11a) +* This release introduces a new `MethodAPI` used by the `TypedClient` which makes the client friendlier for dead code elimination. + Reducing the size of the client when only a subset of the APIs are used. The old `API` structure remains available for backward compatibility, but it is now deprecated. + +# 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) + +# 9.0.1 + +# API + +* Updated APIs to 9.0.4 + +# Typed API + +* Update TypedAPI to latest [elasticsearch-specification 9.0](https://github.com/elastic/elasticsearch-specification/commit/e585438) + # 9.0.0 * The client now requires **Go 1.23** or later. diff --git a/elasticsearch.go b/elasticsearch.go index db88226644..6eec2de9ca 100644 --- a/elasticsearch.go +++ b/elasticsearch.go @@ -151,7 +151,7 @@ type Client struct { // TypedClient represents the Typed API. type TypedClient struct { BaseClient - *typedapi.API + *typedapi.MethodAPI } // NewBaseClient creates a new client free of any API. @@ -249,7 +249,7 @@ func NewTypedClient(cfg Config) (*TypedClient, error) { compatibilityHeader: cfg.EnableCompatibilityMode || compatibilityHeader, }, } - client.API = typedapi.New(client) + client.MethodAPI = typedapi.NewMethodAPI(client) if cfg.DiscoverNodesOnStart { go client.DiscoverNodes() diff --git a/esapi/api._.go b/esapi/api._.go index 14c549cefd..e500c4a4b3 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 9.1.0 (5383f0f): DO NOT EDIT +// Code generated from specification version 9.1.0 (9732617): DO NOT EDIT package esapi @@ -137,10 +137,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 @@ -217,6 +220,9 @@ type API struct { SlmPutLifecycle SlmPutLifecycle SlmStart SlmStart SlmStop SlmStop + StreamsLogsDisable StreamsLogsDisable + StreamsLogsEnable StreamsLogsEnable + StreamsStatus StreamsStatus SynonymsDeleteSynonym SynonymsDeleteSynonym SynonymsDeleteSynonymRule SynonymsDeleteSynonymRule SynonymsGetSynonym SynonymsGetSynonym @@ -331,6 +337,7 @@ type Indices struct { GetDataLifecycleStats IndicesGetDataLifecycleStats GetDataStreamOptions IndicesGetDataStreamOptions GetDataStream IndicesGetDataStream + GetDataStreamSettings IndicesGetDataStreamSettings GetFieldMapping IndicesGetFieldMapping GetIndexTemplate IndicesGetIndexTemplate GetMapping IndicesGetMapping @@ -346,6 +353,7 @@ type Indices struct { PutAlias IndicesPutAlias PutDataLifecycle IndicesPutDataLifecycle PutDataStreamOptions IndicesPutDataStreamOptions + PutDataStreamSettings IndicesPutDataStreamSettings PutIndexTemplate IndicesPutIndexTemplate PutMapping IndicesPutMapping PutSettings IndicesPutSettings @@ -353,6 +361,7 @@ type Indices struct { Recovery IndicesRecovery Refresh IndicesRefresh ReloadSearchAnalyzers IndicesReloadSearchAnalyzers + RemoveBlock IndicesRemoveBlock ResolveCluster IndicesResolveCluster ResolveIndex IndicesResolveIndex Rollover IndicesRollover @@ -777,10 +786,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), @@ -857,6 +869,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), @@ -964,6 +979,7 @@ func New(t Transport) *API { GetDataLifecycleStats: newIndicesGetDataLifecycleStatsFunc(t), GetDataStreamOptions: newIndicesGetDataStreamOptionsFunc(t), GetDataStream: newIndicesGetDataStreamFunc(t), + GetDataStreamSettings: newIndicesGetDataStreamSettingsFunc(t), GetFieldMapping: newIndicesGetFieldMappingFunc(t), GetIndexTemplate: newIndicesGetIndexTemplateFunc(t), GetMapping: newIndicesGetMappingFunc(t), @@ -979,6 +995,7 @@ func New(t Transport) *API { PutAlias: newIndicesPutAliasFunc(t), PutDataLifecycle: newIndicesPutDataLifecycleFunc(t), PutDataStreamOptions: newIndicesPutDataStreamOptionsFunc(t), + PutDataStreamSettings: newIndicesPutDataStreamSettingsFunc(t), PutIndexTemplate: newIndicesPutIndexTemplateFunc(t), PutMapping: newIndicesPutMappingFunc(t), PutSettings: newIndicesPutSettingsFunc(t), @@ -986,6 +1003,7 @@ func New(t Transport) *API { Recovery: newIndicesRecoveryFunc(t), Refresh: newIndicesRefreshFunc(t), ReloadSearchAnalyzers: newIndicesReloadSearchAnalyzersFunc(t), + RemoveBlock: newIndicesRemoveBlockFunc(t), ResolveCluster: newIndicesResolveClusterFunc(t), ResolveIndex: newIndicesResolveIndexFunc(t), Rollover: newIndicesRolloverFunc(t), diff --git a/esapi/api.cluster.get_component_template.go b/esapi/api.cluster.get_component_template.go index bfd4cf3100..72e7ea4860 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 27bdf2074c..44885a3e26 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 6db5890cad..63575133b6 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 index efa27cdedc..5214a3160c 100644 --- a/esapi/api.indices.put_data_stream_options.go +++ b/esapi/api.indices.put_data_stream_options.go @@ -47,8 +47,6 @@ func newIndicesPutDataStreamOptionsFunc(t Transport) IndicesPutDataStreamOptions // IndicesPutDataStreamOptions updates the data stream options of the selected data streams. // -// This API is experimental. -// // 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) 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..7fd81804a5 --- /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 9.1.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 2cebbc0cab..f87008e9d7 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.indices.remove_block.go b/esapi/api.indices.remove_block.go new file mode 100644 index 0000000000..e348d8ef7d --- /dev/null +++ b/esapi/api.indices.remove_block.go @@ -0,0 +1,298 @@ +// 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 9.1.0: DO NOT EDIT + +package esapi + +import ( + "context" + "errors" + "net/http" + "strconv" + "strings" + "time" +) + +func newIndicesRemoveBlockFunc(t Transport) IndicesRemoveBlock { + return func(index []string, block string, o ...func(*IndicesRemoveBlockRequest)) (*Response, error) { + var r = IndicesRemoveBlockRequest{Index: index, Block: block} + for _, f := range o { + f(&r) + } + + if transport, ok := t.(Instrumented); ok { + r.Instrument = transport.InstrumentationEnabled() + } + + return r.Do(r.ctx, t) + } +} + +// ----- API Definition ------------------------------------------------------- + +// IndicesRemoveBlock removes a block from an index. +// +// See full documentation at https://www.elastic.co/guide/en/elasticsearch/reference/master/index-modules-blocks.html. +type IndicesRemoveBlock func(index []string, block string, o ...func(*IndicesRemoveBlockRequest)) (*Response, error) + +// IndicesRemoveBlockRequest configures the Indices Remove Block API request. +type IndicesRemoveBlockRequest struct { + Index []string + + Block string + + AllowNoIndices *bool + ExpandWildcards string + IgnoreUnavailable *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 IndicesRemoveBlockRequest) 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.remove_block") + defer instrument.Close(ctx) + } + if ctx == nil { + ctx = providedCtx + } + + method = "DELETE" + + if len(r.Index) == 0 { + return nil, errors.New("index is required and cannot be nil or empty") + } + + path.Grow(7 + 1 + len(strings.Join(r.Index, ",")) + 1 + len("_block") + 1 + len(r.Block)) + path.WriteString("http://") + path.WriteString("/") + path.WriteString(strings.Join(r.Index, ",")) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", strings.Join(r.Index, ",")) + } + path.WriteString("/") + path.WriteString("_block") + path.WriteString("/") + path.WriteString(r.Block) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.RecordPathPart(ctx, "block", r.Block) + } + + params = make(map[string]string) + + if r.AllowNoIndices != nil { + params["allow_no_indices"] = strconv.FormatBool(*r.AllowNoIndices) + } + + if r.ExpandWildcards != "" { + params["expand_wildcards"] = r.ExpandWildcards + } + + if r.IgnoreUnavailable != nil { + params["ignore_unavailable"] = strconv.FormatBool(*r.IgnoreUnavailable) + } + + 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.remove_block") + } + res, err := transport.Perform(req) + if instrument, ok := r.Instrument.(Instrumentation); ok { + instrument.AfterRequest(req, "elasticsearch", "indices.remove_block") + } + 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 IndicesRemoveBlock) WithContext(v context.Context) func(*IndicesRemoveBlockRequest) { + return func(r *IndicesRemoveBlockRequest) { + r.ctx = v + } +} + +// 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 IndicesRemoveBlock) WithAllowNoIndices(v bool) func(*IndicesRemoveBlockRequest) { + return func(r *IndicesRemoveBlockRequest) { + r.AllowNoIndices = &v + } +} + +// WithExpandWildcards - whether to expand wildcard expression to concrete indices that are open, closed or both.. +func (f IndicesRemoveBlock) WithExpandWildcards(v string) func(*IndicesRemoveBlockRequest) { + return func(r *IndicesRemoveBlockRequest) { + r.ExpandWildcards = v + } +} + +// WithIgnoreUnavailable - whether specified concrete indices should be ignored when unavailable (missing or closed). +func (f IndicesRemoveBlock) WithIgnoreUnavailable(v bool) func(*IndicesRemoveBlockRequest) { + return func(r *IndicesRemoveBlockRequest) { + r.IgnoreUnavailable = &v + } +} + +// WithMasterTimeout - specify timeout for connection to master. +func (f IndicesRemoveBlock) WithMasterTimeout(v time.Duration) func(*IndicesRemoveBlockRequest) { + return func(r *IndicesRemoveBlockRequest) { + r.MasterTimeout = v + } +} + +// WithTimeout - explicit operation timeout. +func (f IndicesRemoveBlock) WithTimeout(v time.Duration) func(*IndicesRemoveBlockRequest) { + return func(r *IndicesRemoveBlockRequest) { + r.Timeout = v + } +} + +// WithPretty makes the response body pretty-printed. +func (f IndicesRemoveBlock) WithPretty() func(*IndicesRemoveBlockRequest) { + return func(r *IndicesRemoveBlockRequest) { + r.Pretty = true + } +} + +// WithHuman makes statistical values human-readable. +func (f IndicesRemoveBlock) WithHuman() func(*IndicesRemoveBlockRequest) { + return func(r *IndicesRemoveBlockRequest) { + r.Human = true + } +} + +// WithErrorTrace includes the stack trace for errors in the response body. +func (f IndicesRemoveBlock) WithErrorTrace() func(*IndicesRemoveBlockRequest) { + return func(r *IndicesRemoveBlockRequest) { + r.ErrorTrace = true + } +} + +// WithFilterPath filters the properties of the response body. +func (f IndicesRemoveBlock) WithFilterPath(v ...string) func(*IndicesRemoveBlockRequest) { + return func(r *IndicesRemoveBlockRequest) { + r.FilterPath = v + } +} + +// WithHeader adds the headers to the HTTP request. +func (f IndicesRemoveBlock) WithHeader(h map[string]string) func(*IndicesRemoveBlockRequest) { + return func(r *IndicesRemoveBlockRequest) { + 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 IndicesRemoveBlock) WithOpaqueID(s string) func(*IndicesRemoveBlockRequest) { + return func(r *IndicesRemoveBlockRequest) { + if r.Header == nil { + r.Header = make(http.Header) + } + r.Header.Set("X-Opaque-Id", s) + } +} diff --git a/esapi/api.inference.put_amazonsagemaker.go b/esapi/api.inference.put_amazonsagemaker.go new file mode 100644 index 0000000000..4dc2eb09ca --- /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 9.1.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..46cc733578 --- /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 9.1.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..dc1c458572 --- /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 9.1.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.msearch.go b/esapi/api.msearch.go index 737d5d7b50..ddcafc932d 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 798d196486..ebea311a54 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 8d6eb43130..84b72dbcbb 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.get.go b/esapi/api.snapshot.get.go index 3720d379b3..0a66843fd3 100644 --- a/esapi/api.snapshot.get.go +++ b/esapi/api.snapshot.get.go @@ -67,6 +67,7 @@ type SnapshotGetRequest struct { Size *int SlmPolicyFilter string Sort string + State []string Verbose *bool Pretty bool @@ -169,6 +170,10 @@ func (r SnapshotGetRequest) Do(providedCtx context.Context, transport Transport) params["sort"] = r.Sort } + if len(r.State) > 0 { + params["state"] = strings.Join(r.State, ",") + } + if r.Verbose != nil { params["verbose"] = strconv.FormatBool(*r.Verbose) } @@ -335,6 +340,13 @@ func (f SnapshotGet) WithSort(v string) func(*SnapshotGetRequest) { } } +// WithState - filter snapshots by a list of states. valid state values are 'success', 'in_progress', 'failed', 'partial', or 'incompatible'.. +func (f SnapshotGet) WithState(v ...string) func(*SnapshotGetRequest) { + return func(r *SnapshotGetRequest) { + r.State = v + } +} + // WithVerbose - whether to show verbose snapshot info or only show the basic info found in the repository index blob. func (f SnapshotGet) WithVerbose(v bool) func(*SnapshotGetRequest) { return func(r *SnapshotGetRequest) { diff --git a/esapi/api.snapshot.repository_analyze.go b/esapi/api.snapshot.repository_analyze.go index 5c62c76631..672c0bb8d9 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..e7e91da47a --- /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 9.1.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..b883b0ba3b --- /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 9.1.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..91ddf87a9f --- /dev/null +++ b/esapi/api.streams.status.go @@ -0,0 +1,229 @@ +// 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 9.1.0: DO NOT EDIT + +package esapi + +import ( + "context" + "net/http" + "strings" + "time" +) + +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 { + MaterTimeout 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 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.MaterTimeout != 0 { + params["mater_timeout"] = formatDuration(r.MaterTimeout) + } + + 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 + } +} + +// WithMaterTimeout - period to wait for a response. if no response is received before the timeout expires, the request fails and returns an error.. +func (f StreamsStatus) WithMaterTimeout(v time.Duration) func(*StreamsStatusRequest) { + return func(r *StreamsStatusRequest) { + r.MaterTimeout = 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.synonyms.delete_synonym_rule.go b/esapi/api.synonyms.delete_synonym_rule.go index a96b953697..b2c79cd9cf 100644 --- a/esapi/api.synonyms.delete_synonym_rule.go +++ b/esapi/api.synonyms.delete_synonym_rule.go @@ -22,6 +22,7 @@ package esapi import ( "context" "net/http" + "strconv" "strings" ) @@ -52,6 +53,8 @@ type SynonymsDeleteSynonymRuleRequest struct { RuleID string SetID string + Refresh *bool + Pretty bool Human bool ErrorTrace bool @@ -100,6 +103,10 @@ func (r SynonymsDeleteSynonymRuleRequest) Do(providedCtx context.Context, transp params = make(map[string]string) + if r.Refresh != nil { + params["refresh"] = strconv.FormatBool(*r.Refresh) + } + if r.Pretty { params["pretty"] = "true" } @@ -178,6 +185,13 @@ func (f SynonymsDeleteSynonymRule) WithContext(v context.Context) func(*Synonyms } } +// WithRefresh - refresh search analyzers to update synonyms. +func (f SynonymsDeleteSynonymRule) WithRefresh(v bool) func(*SynonymsDeleteSynonymRuleRequest) { + return func(r *SynonymsDeleteSynonymRuleRequest) { + r.Refresh = &v + } +} + // WithPretty makes the response body pretty-printed. func (f SynonymsDeleteSynonymRule) WithPretty() func(*SynonymsDeleteSynonymRuleRequest) { return func(r *SynonymsDeleteSynonymRuleRequest) { diff --git a/esapi/api.synonyms.put_synonym.go b/esapi/api.synonyms.put_synonym.go index 047bca23a8..00bf711b14 100644 --- a/esapi/api.synonyms.put_synonym.go +++ b/esapi/api.synonyms.put_synonym.go @@ -23,6 +23,7 @@ import ( "context" "io" "net/http" + "strconv" "strings" ) @@ -54,6 +55,8 @@ type SynonymsPutSynonymRequest struct { Body io.Reader + Refresh *bool + Pretty bool Human bool ErrorTrace bool @@ -97,6 +100,10 @@ func (r SynonymsPutSynonymRequest) Do(providedCtx context.Context, transport Tra params = make(map[string]string) + if r.Refresh != nil { + params["refresh"] = strconv.FormatBool(*r.Refresh) + } + if r.Pretty { params["pretty"] = "true" } @@ -182,6 +189,13 @@ func (f SynonymsPutSynonym) WithContext(v context.Context) func(*SynonymsPutSyno } } +// WithRefresh - refresh search analyzers to update synonyms. +func (f SynonymsPutSynonym) WithRefresh(v bool) func(*SynonymsPutSynonymRequest) { + return func(r *SynonymsPutSynonymRequest) { + r.Refresh = &v + } +} + // WithPretty makes the response body pretty-printed. func (f SynonymsPutSynonym) WithPretty() func(*SynonymsPutSynonymRequest) { return func(r *SynonymsPutSynonymRequest) { diff --git a/esapi/api.synonyms.put_synonym_rule.go b/esapi/api.synonyms.put_synonym_rule.go index 560352322c..eb28efc524 100644 --- a/esapi/api.synonyms.put_synonym_rule.go +++ b/esapi/api.synonyms.put_synonym_rule.go @@ -23,6 +23,7 @@ import ( "context" "io" "net/http" + "strconv" "strings" ) @@ -55,6 +56,8 @@ type SynonymsPutSynonymRuleRequest struct { RuleID string SetID string + Refresh *bool + Pretty bool Human bool ErrorTrace bool @@ -103,6 +106,10 @@ func (r SynonymsPutSynonymRuleRequest) Do(providedCtx context.Context, transport params = make(map[string]string) + if r.Refresh != nil { + params["refresh"] = strconv.FormatBool(*r.Refresh) + } + if r.Pretty { params["pretty"] = "true" } @@ -188,6 +195,13 @@ func (f SynonymsPutSynonymRule) WithContext(v context.Context) func(*SynonymsPut } } +// WithRefresh - refresh search analyzers to update synonyms. +func (f SynonymsPutSynonymRule) WithRefresh(v bool) func(*SynonymsPutSynonymRuleRequest) { + return func(r *SynonymsPutSynonymRuleRequest) { + r.Refresh = &v + } +} + // WithPretty makes the response body pretty-printed. func (f SynonymsPutSynonymRule) WithPretty() func(*SynonymsPutSynonymRuleRequest) { return func(r *SynonymsPutSynonymRuleRequest) { diff --git a/esapi/api.xpack.eql.search.go b/esapi/api.xpack.eql.search.go index 0d884227bb..c467e17d8a 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_get.go b/esapi/api.xpack.esql.async_query_get.go index c81dadd9e3..69c2ec8cc1 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.indices.delete_data_stream_options.go b/esapi/api.xpack.indices.delete_data_stream_options.go index e7880e324d..eeb7035550 100644 --- a/esapi/api.xpack.indices.delete_data_stream_options.go +++ b/esapi/api.xpack.indices.delete_data_stream_options.go @@ -46,8 +46,6 @@ func newIndicesDeleteDataStreamOptionsFunc(t Transport) IndicesDeleteDataStreamO // IndicesDeleteDataStreamOptions - Deletes the data stream options of the selected data streams. // -// This API is experimental. -// // 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) diff --git a/esapi/api.xpack.indices.get_data_stream_options.go b/esapi/api.xpack.indices.get_data_stream_options.go index 0e55149fc8..8cc68ce2ec 100644 --- a/esapi/api.xpack.indices.get_data_stream_options.go +++ b/esapi/api.xpack.indices.get_data_stream_options.go @@ -23,7 +23,6 @@ import ( "context" "errors" "net/http" - "strconv" "strings" "time" ) @@ -47,8 +46,6 @@ func newIndicesGetDataStreamOptionsFunc(t Transport) IndicesGetDataStreamOptions // IndicesGetDataStreamOptions - Returns the data stream options of the selected data streams. // -// This API is experimental. -// // 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) @@ -57,7 +54,6 @@ type IndicesGetDataStreamOptionsRequest struct { Name []string ExpandWildcards string - IncludeDefaults *bool MasterTimeout time.Duration Pretty bool @@ -113,10 +109,6 @@ func (r IndicesGetDataStreamOptionsRequest) Do(providedCtx context.Context, tran params["expand_wildcards"] = r.ExpandWildcards } - if r.IncludeDefaults != nil { - params["include_defaults"] = strconv.FormatBool(*r.IncludeDefaults) - } - if r.MasterTimeout != 0 { params["master_timeout"] = formatDuration(r.MasterTimeout) } @@ -206,13 +198,6 @@ func (f IndicesGetDataStreamOptions) WithExpandWildcards(v string) func(*Indices } } -// WithIncludeDefaults - return all relevant default configurations for the data stream (default: false). -func (f IndicesGetDataStreamOptions) WithIncludeDefaults(v bool) func(*IndicesGetDataStreamOptionsRequest) { - return func(r *IndicesGetDataStreamOptionsRequest) { - r.IncludeDefaults = &v - } -} - // WithMasterTimeout - specify timeout for connection to master. func (f IndicesGetDataStreamOptions) WithMasterTimeout(v time.Duration) func(*IndicesGetDataStreamOptionsRequest) { return func(r *IndicesGetDataStreamOptionsRequest) { 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..931399b06a --- /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 9.1.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 5b3d2ed809..83179b9e1f 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 0f7ae37522..6e59b486c0 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/internal/build/cmd/generate/commands/gentests/generator.go b/internal/build/cmd/generate/commands/gentests/generator.go index 766ffafac0..ebb6a3b2e8 100644 --- a/internal/build/cmd/generate/commands/gentests/generator.go +++ b/internal/build/cmd/generate/commands/gentests/generator.go @@ -902,6 +902,15 @@ func (g *Generator) genSteps(t Test) { if !t.Steps.ContainsAssertion() && !t.Steps.ContainsCatch() && !t.Steps.ContainsStash() { skipBody = true } + + if t.Steps.ContainsCallToEndpoint("knn_search") { + t.Skip = true + t.SkipInfo = "knn_search is not supported anymore" + g.w("\t// Skipping test because knn_search is not supported anymore\n") + g.w("\tt.SkipNow()\n\n") + return + } + g.genVarSection(t, skipBody) for _, step := range t.Steps { diff --git a/internal/build/cmd/generate/commands/gentests/model.go b/internal/build/cmd/generate/commands/gentests/model.go index e1f7eded8b..de28bc2ebb 100644 --- a/internal/build/cmd/generate/commands/gentests/model.go +++ b/internal/build/cmd/generate/commands/gentests/model.go @@ -365,6 +365,18 @@ func (s Steps) ContainsStash(keys ...string) bool { return false } +// ContainsCallToEndpoint returns true when the set of steps contains a call to an endpoint. +func (s Steps) ContainsCallToEndpoint(endpoint string) bool { + for _, step := range s { + if a, ok := step.(Action); ok { + if a.Method() == utils.NameToGo(endpoint) { + return true + } + } + } + return false +} + // Method returns the API method name for the action. func (a Action) Method() string { return utils.NameToGo(a.method) diff --git a/internal/build/cmd/generate/commands/gentests/skips.go b/internal/build/cmd/generate/commands/gentests/skips.go index 6e5259a20a..4689383be9 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()` @@ -427,6 +433,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: @@ -453,6 +463,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: @@ -559,6 +578,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 @@ -626,4 +648,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 e29d78d55f..90b84cb800 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" @@ -332,9 +331,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 d0b638b5e8..dcddb70e93 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package typedapi @@ -211,6 +211,7 @@ import ( indices_delete_alias "github.com/elastic/go-elasticsearch/v9/typedapi/indices/deletealias" indices_delete_data_lifecycle "github.com/elastic/go-elasticsearch/v9/typedapi/indices/deletedatalifecycle" indices_delete_data_stream "github.com/elastic/go-elasticsearch/v9/typedapi/indices/deletedatastream" + indices_delete_data_stream_options "github.com/elastic/go-elasticsearch/v9/typedapi/indices/deletedatastreamoptions" indices_delete_index_template "github.com/elastic/go-elasticsearch/v9/typedapi/indices/deleteindextemplate" indices_delete_template "github.com/elastic/go-elasticsearch/v9/typedapi/indices/deletetemplate" indices_disk_usage "github.com/elastic/go-elasticsearch/v9/typedapi/indices/diskusage" @@ -228,6 +229,8 @@ import ( indices_get_data_lifecycle "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getdatalifecycle" indices_get_data_lifecycle_stats "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getdatalifecyclestats" indices_get_data_stream "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getdatastream" + indices_get_data_stream_options "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getdatastreamoptions" + indices_get_data_stream_settings "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getdatastreamsettings" indices_get_field_mapping "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getfieldmapping" indices_get_index_template "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getindextemplate" indices_get_mapping "github.com/elastic/go-elasticsearch/v9/typedapi/indices/getmapping" @@ -241,6 +244,8 @@ import ( indices_promote_data_stream "github.com/elastic/go-elasticsearch/v9/typedapi/indices/promotedatastream" indices_put_alias "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putalias" indices_put_data_lifecycle "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putdatalifecycle" + indices_put_data_stream_options "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putdatastreamoptions" + indices_put_data_stream_settings "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putdatastreamsettings" indices_put_index_template "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putindextemplate" indices_put_mapping "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putmapping" indices_put_settings "github.com/elastic/go-elasticsearch/v9/typedapi/indices/putsettings" @@ -248,6 +253,7 @@ import ( indices_recovery "github.com/elastic/go-elasticsearch/v9/typedapi/indices/recovery" indices_refresh "github.com/elastic/go-elasticsearch/v9/typedapi/indices/refresh" indices_reload_search_analyzers "github.com/elastic/go-elasticsearch/v9/typedapi/indices/reloadsearchanalyzers" + indices_remove_block "github.com/elastic/go-elasticsearch/v9/typedapi/indices/removeblock" indices_resolve_cluster "github.com/elastic/go-elasticsearch/v9/typedapi/indices/resolvecluster" indices_resolve_index "github.com/elastic/go-elasticsearch/v9/typedapi/indices/resolveindex" indices_rollover "github.com/elastic/go-elasticsearch/v9/typedapi/indices/rollover" @@ -268,10 +274,13 @@ import ( inference_put "github.com/elastic/go-elasticsearch/v9/typedapi/inference/put" inference_put_alibabacloud "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putalibabacloud" inference_put_amazonbedrock "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putamazonbedrock" + inference_put_amazonsagemaker "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putamazonsagemaker" inference_put_anthropic "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putanthropic" inference_put_azureaistudio "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putazureaistudio" inference_put_azureopenai "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putazureopenai" inference_put_cohere "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putcohere" + inference_put_custom "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putcustom" + inference_put_deepseek "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putdeepseek" inference_put_elasticsearch "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putelasticsearch" inference_put_elser "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putelser" inference_put_googleaistudio "github.com/elastic/go-elasticsearch/v9/typedapi/inference/putgoogleaistudio" @@ -524,6 +533,9 @@ import ( sql_query "github.com/elastic/go-elasticsearch/v9/typedapi/sql/query" sql_translate "github.com/elastic/go-elasticsearch/v9/typedapi/sql/translate" ssl_certificates "github.com/elastic/go-elasticsearch/v9/typedapi/ssl/certificates" + streams_logs_disable "github.com/elastic/go-elasticsearch/v9/typedapi/streams/logsdisable" + streams_logs_enable "github.com/elastic/go-elasticsearch/v9/typedapi/streams/logsenable" + streams_status "github.com/elastic/go-elasticsearch/v9/typedapi/streams/status" synonyms_delete_synonym "github.com/elastic/go-elasticsearch/v9/typedapi/synonyms/deletesynonym" synonyms_delete_synonym_rule "github.com/elastic/go-elasticsearch/v9/typedapi/synonyms/deletesynonymrule" synonyms_get_synonym "github.com/elastic/go-elasticsearch/v9/typedapi/synonyms/getsynonym" @@ -568,7992 +580,689 @@ 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/docs/api/doc/elasticsearch/operation/operation-async-search-submit 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/docs/api/doc/elasticsearch/operation/operation-async-search-submit - 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/docs/api/doc/elasticsearch/operation/operation-async-search-submit + 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/docs/api/doc/elasticsearch/operation/operation-async-search-submit 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/docs/api/doc/elasticsearch/operation/operation-autoscaling-delete-autoscaling-policy 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/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-capacity - 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/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-capacity - 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/docs/api/doc/elasticsearch/operation/operation-autoscaling-put-autoscaling-policy - 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/docs/api/doc/elasticsearch/operation/operation-cat-aliases - 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/docs/api/doc/elasticsearch/operation/operation-cat-allocation - 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/docs/api/doc/elasticsearch/operation/operation-cat-component-templates - 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/docs/api/doc/elasticsearch/operation/operation-cat-count - 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/docs/api/doc/elasticsearch/operation/operation-cat-fielddata - 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/docs/api/doc/elasticsearch/operation/operation-cat-health - Health cat_health.NewHealth - // Get CAT help. - // - // Get help for the CAT APIs. - // https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cat - 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/docs/api/doc/elasticsearch/operation/operation-cat-indices - 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/docs/api/doc/elasticsearch/operation/operation-cat-master - 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/docs/api/doc/elasticsearch/operation/operation-cat-ml-data-frame-analytics + 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/docs/api/doc/elasticsearch/operation/operation-cat-ml-datafeeds - 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/docs/api/doc/elasticsearch/operation/operation-cat-ml-jobs - 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/docs/api/doc/elasticsearch/operation/operation-cat-ml-trained-models - 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/docs/api/doc/elasticsearch/operation/operation-cat-nodeattrs - 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/docs/api/doc/elasticsearch/operation/operation-cat-nodes - 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/docs/api/doc/elasticsearch/operation/operation-cat-pending-tasks - 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/docs/api/doc/elasticsearch/operation/operation-cat-plugins - 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/docs/api/doc/elasticsearch/operation/operation-cat-recovery - 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/docs/api/doc/elasticsearch/operation/operation-cat-repositories - 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/docs/api/doc/elasticsearch/operation/operation-cat-segments - 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/docs/api/doc/elasticsearch/operation/operation-cat-shards - 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/docs/api/doc/elasticsearch/operation/operation-cat-snapshots - 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/docs/api/doc/elasticsearch/operation/operation-cat-tasks - 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/docs/api/doc/elasticsearch/operation/operation-cat-templates - 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/docs/api/doc/elasticsearch/operation/operation-cat-thread-pool - 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/docs/api/doc/elasticsearch/operation/operation-cat-transforms - 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/docs/api/doc/elasticsearch/operation/operation-ccr-delete-auto-follow-pattern 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/docs/api/doc/elasticsearch/operation/operation-ccr-follow - 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/docs/api/doc/elasticsearch/operation/operation-ccr-follow-info - 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/docs/api/doc/elasticsearch/operation/operation-ccr-follow-stats - 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/docs/api/doc/elasticsearch/operation/operation-ccr-forget-follower - ForgetFollower ccr_forget_follower.NewForgetFollower - // Get auto-follow patterns. - // - // Get cross-cluster replication auto-follow patterns. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-get-auto-follow-pattern-1 - 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/docs/api/doc/elasticsearch/operation/operation-ccr-pause-auto-follow-pattern - 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/docs/api/doc/elasticsearch/operation/operation-ccr-pause-follow - 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/docs/api/doc/elasticsearch/operation/operation-ccr-put-auto-follow-pattern - 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/docs/api/doc/elasticsearch/operation/operation-ccr-resume-auto-follow-pattern + 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/docs/api/doc/elasticsearch/operation/operation-ccr-resume-follow - 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/docs/api/doc/elasticsearch/operation/operation-ccr-stats - 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/docs/api/doc/elasticsearch/operation/operation-ccr-unfollow - 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/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain - 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/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template - 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/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/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template - ExistsComponentTemplate cluster_exists_component_template.NewExistsComponentTemplate - // Get component templates. - // Get information about component templates. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template - 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/docs/api/doc/elasticsearch/operation/operation-cluster-get-settings - 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/docs/api/doc/elasticsearch/operation/operation-cluster-health - Health cluster_health.NewHealth - // Get cluster info. - // Returns basic information about the cluster. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-info - 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/docs/api/doc/elasticsearch/operation/operation-cluster-pending-tasks - 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/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/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template - 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/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings - 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/docs/api/doc/elasticsearch/operation/operation-cluster-remote-info - 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/docs/api/doc/elasticsearch/operation/operation-cluster-reroute - 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/docs/api/doc/elasticsearch/operation/operation-cluster-state - 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/docs/api/doc/elasticsearch/operation/operation-cluster-stats - 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/docs/api/doc/elasticsearch/operation/operation-connector-check-in - 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/docs/api/doc/elasticsearch/operation/operation-connector-delete - Delete connector_delete.NewDelete - // Get a connector. - // - // Get the details about a connector. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-get - 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/docs/api/doc/elasticsearch/operation/operation-connector-last-sync - LastSync connector_last_sync.NewLastSync - // Get all connectors. - // - // Get information about all connectors. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-list - 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/docs/api/doc/elasticsearch/operation/operation-connector-put - Post connector_post.NewPost - // Create or update a connector. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-put - 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-cancel - 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-check-in - 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-claim - 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-delete - 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-error - SyncJobError connector_sync_job_error.NewSyncJobError - // Get a connector sync job. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-get - 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-list - 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-post - 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-update-stats - SyncJobUpdateStats connector_sync_job_update_stats.NewSyncJobUpdateStats - // Activate the connector draft filter. - // - // Activates the valid draft filtering for a connector. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering - 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/docs/api/doc/elasticsearch/operation/operation-connector-update-api-key-id - UpdateApiKeyId connector_update_api_key_id.NewUpdateApiKeyId - // Update the connector configuration. - // - // Update the configuration field in the connector document. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-configuration - 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/docs/api/doc/elasticsearch/operation/operation-connector-update-error - 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/docs/api/doc/elasticsearch/operation/operation-connector-update-features - 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/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering - UpdateFiltering connector_update_filtering.NewUpdateFiltering - // Update the connector draft filtering validation. - // - // Update the draft filtering validation info for a connector. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering-validation + 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/docs/api/doc/elasticsearch/operation/operation-connector-update-index-name - UpdateIndexName connector_update_index_name.NewUpdateIndexName - // Update the connector name and description. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-name - UpdateName connector_update_name.NewUpdateName - // Update the connector is_native flag. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-native - 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/docs/api/doc/elasticsearch/operation/operation-connector-update-pipeline - UpdatePipeline connector_update_pipeline.NewUpdatePipeline - // Update the connector scheduling. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-scheduling - UpdateScheduling connector_update_scheduling.NewUpdateScheduling - // Update the connector service type. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-service-type - UpdateServiceType connector_update_service_type.NewUpdateServiceType - // Update the connector status. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-status - 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/docs/api/doc/elasticsearch/operation/operation-bulk - Bulk core_bulk.NewBulk - // Clear a scrolling search. - // Clear the search context and results for a scrolling search. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll - 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/docs/api/doc/elasticsearch/operation/operation-open-point-in-time - 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/docs/api/doc/elasticsearch/operation/operation-count - 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/docs/api/doc/elasticsearch/operation/operation-create - 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/docs/api/doc/elasticsearch/operation/operation-delete - 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/docs/api/doc/elasticsearch/operation/operation-delete-by-query - 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/docs/api/doc/elasticsearch/operation/operation-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/docs/api/doc/elasticsearch/operation/operation-delete-script - 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/docs/api/doc/elasticsearch/operation/operation-get - 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/docs/api/doc/elasticsearch/operation/operation-get - 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/docs/api/doc/elasticsearch/operation/operation-explain - 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/docs/api/doc/elasticsearch/operation/operation-field-caps - 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/docs/api/doc/elasticsearch/operation/operation-get - Get core_get.NewGet - // Get a script or search template. - // Retrieves a stored script or search template. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script - GetScript core_get_script.NewGetScript - // Get script contexts. - // - // Get a list of supported script contexts and their methods. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-context - GetScriptContext core_get_script_context.NewGetScriptContext - // Get script languages. - // - // Get a list of available script types, languages, and contexts. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-languages - 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/docs/api/doc/elasticsearch/operation/operation-get - 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/docs/api/doc/elasticsearch/operation/operation-health-report - 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/docs/api/doc/elasticsearch/operation/operation-create - Index core_index.NewIndex - // Get cluster info. - // Get basic build, version, and cluster information. - // https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info - Info core_info.NewInfo - // 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/docs/api/doc/elasticsearch/operation/operation-mget - 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/docs/api/doc/elasticsearch/operation/operation-msearch - 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/docs/api/doc/elasticsearch/operation/operation-msearch-template - 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/docs/api/doc/elasticsearch/operation/operation-mtermvectors - 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/docs/api/doc/elasticsearch/operation/operation-open-point-in-time - OpenPointInTime core_open_point_in_time.NewOpenPointInTime - // Ping the cluster. - // Get information about whether the cluster is running. - // https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster - 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/docs/api/doc/elasticsearch/operation/operation-put-script - 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/docs/api/doc/elasticsearch/operation/operation-rank-eval - 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/docs/api/doc/elasticsearch/operation/operation-reindex - 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/docs/api/doc/elasticsearch/operation/operation-reindex - ReindexRethrottle core_reindex_rethrottle.NewReindexRethrottle - // Render a search template. - // - // Render a search template as a search request body. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-render-search-template - 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/docs/reference/scripting-languages/painless/painless-api-examples - 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/docs/api/doc/elasticsearch/operation/operation-scroll - 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/docs/api/doc/elasticsearch/operation/operation-search - 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/docs/api/doc/elasticsearch/operation/operation-search-mvt - 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/docs/api/doc/elasticsearch/operation/operation-search-shards - SearchShards core_search_shards.NewSearchShards - // Run a search with a search template. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-template - 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/docs/api/doc/elasticsearch/operation/operation-terms-enum - 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/docs/api/doc/elasticsearch/operation/operation-termvectors - 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/docs/api/doc/elasticsearch/operation/operation-update - 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/docs/api/doc/elasticsearch/operation/operation-update-by-query - 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/docs/api/doc/elasticsearch/operation/operation-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 + 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/docs/api/doc/elasticsearch/operation/operation-dangling-indices-delete-dangling-index 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/docs/api/doc/elasticsearch/operation/operation-dangling-indices-import-dangling-index 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/docs/api/doc/elasticsearch/operation/operation-dangling-indices-list-dangling-indices 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/docs/api/doc/elasticsearch/operation/operation-enrich-delete-policy - DeletePolicy enrich_delete_policy.NewDeletePolicy - // Run an enrich policy. - // Create the enrich index for an existing enrich policy. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-execute-policy + DeletePolicy enrich_delete_policy.NewDeletePolicy ExecutePolicy enrich_execute_policy.NewExecutePolicy - // Get an enrich policy. - // Returns information about an enrich policy. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-get-policy - GetPolicy enrich_get_policy.NewGetPolicy - // Create an enrich policy. - // Creates an enrich policy. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy - 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/docs/api/doc/elasticsearch/operation/operation-enrich-stats - 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/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/docs/api/doc/elasticsearch/operation/operation-eql-get - 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/docs/api/doc/elasticsearch/operation/operation-eql-get-status + 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/docs/api/doc/elasticsearch/operation/operation-eql-search - 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/docs/api/doc/elasticsearch/operation/operation-esql-async-query - 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/docs/api/doc/elasticsearch/operation/operation-esql-async-query-delete + 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/docs/api/doc/elasticsearch/operation/operation-esql-async-query-get - 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/docs/api/doc/elasticsearch/operation/operation-esql-async-query-stop - AsyncQueryStop esql_async_query_stop.NewAsyncQueryStop - // Get a specific running ES|QL query information. - // Returns an object extended information about a running ES|QL query. - // - GetQuery esql_get_query.NewGetQuery - // Get running ES|QL queries information. - // Returns an object containing IDs and other information about the running - // ES|QL queries. - // - ListQueries esql_list_queries.NewListQueries - // Run an ES|QL query. - // Get search results for an ES|QL (Elasticsearch query language) query. - // https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest - Query esql_query.NewQuery + AsyncQueryGet esql_async_query_get.NewAsyncQueryGet + AsyncQueryStop esql_async_query_stop.NewAsyncQueryStop + GetQuery esql_get_query.NewGetQuery + ListQueries esql_list_queries.NewListQueries + 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/docs/api/doc/elasticsearch/operation/operation-features-get-features - 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/docs/api/doc/elasticsearch/operation/operation-features-reset-features + 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/docs/api/doc/elasticsearch/group/endpoint-fleet GlobalCheckpoints fleet_global_checkpoints.NewGlobalCheckpoints - // Run multiple Fleet searches. - // Run several Fleet searches with a single API request. - // The API follows the same structure as the multi search API. - // However, similar to the Fleet search API, it supports the - // `wait_for_checkpoints` parameter. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-fleet-msearch - Msearch fleet_msearch.NewMsearch - // Creates a secret stored by Fleet. - // - PostSecret fleet_post_secret.NewPostSecret - // Run a Fleet search. - // The purpose of the Fleet search API is to provide an API where the search - // will be run only - // after the provided checkpoint has been processed and is visible for searches - // inside of Elasticsearch. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-fleet-search - 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/docs/api/doc/elasticsearch/group/endpoint-graph 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/docs/api/doc/elasticsearch/operation/operation-ilm-delete-lifecycle - 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/docs/api/doc/elasticsearch/operation/operation-ilm-explain-lifecycle - ExplainLifecycle ilm_explain_lifecycle.NewExplainLifecycle - // Get lifecycle policies. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-lifecycle - GetLifecycle ilm_get_lifecycle.NewGetLifecycle - // Get the ILM status. - // - // Get the current index lifecycle management status. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-status - 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/docs/api/doc/elasticsearch/operation/operation-ilm-migrate-to-data-tiers + 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/docs/api/doc/elasticsearch/operation/operation-ilm-move-to-step - 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/docs/api/doc/elasticsearch/operation/operation-ilm-put-lifecycle - 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/docs/api/doc/elasticsearch/operation/operation-ilm-remove-policy - 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/docs/api/doc/elasticsearch/operation/operation-ilm-retry - 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/docs/api/doc/elasticsearch/operation/operation-ilm-start - 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/docs/api/doc/elasticsearch/operation/operation-ilm-stop - 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/docs/api/doc/elasticsearch/operation/operation-indices-add-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/docs/api/doc/elasticsearch/operation/operation-indices-analyze - Analyze indices_analyze.NewAnalyze - // Cancel a migration reindex operation. - // - // Cancel a migration reindex attempt for a data stream or index. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-cancel-migrate-reindex - 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/docs/api/doc/elasticsearch/operation/operation-indices-clear-cache - 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/docs/api/doc/elasticsearch/operation/operation-indices-clone - 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/docs/api/doc/elasticsearch/operation/operation-indices-close - 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/docs/api/doc/elasticsearch/operation/operation-indices-create - Create indices_create.NewCreate - // Create a data stream. - // - // You must have a matching index template with data stream enabled. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-data-stream - 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/docs/api/doc/elasticsearch/operation/operation-indices-create-from - CreateFrom indices_create_from.NewCreateFrom - // Get data stream stats. - // - // Get statistics for one or more data streams. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-data-streams-stats-1 - 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/docs/api/doc/elasticsearch/operation/operation-indices-delete - Delete indices_delete.NewDelete - // Delete an alias. - // Removes a data stream or index from an alias. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-alias - 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/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle - DeleteDataLifecycle indices_delete_data_lifecycle.NewDeleteDataLifecycle - // Delete data streams. - // Deletes one or more data streams and their backing indices. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream - 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/docs/api/doc/elasticsearch/operation/operation-indices-delete-index-template - DeleteIndexTemplate indices_delete_index_template.NewDeleteIndexTemplate - // Delete a legacy index template. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-template - 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/docs/api/doc/elasticsearch/operation/operation-indices-disk-usage - 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/docs/api/doc/elasticsearch/operation/operation-indices-downsample - Downsample indices_downsample.NewDownsample - // Check indices. - // Check if one or more indices, index aliases, or data streams exist. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists - 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/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/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/docs/api/doc/elasticsearch/operation/operation-indices-exists-template - 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/docs/api/doc/elasticsearch/operation/operation-indices-explain-data-lifecycle - 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/docs/api/doc/elasticsearch/operation/operation-indices-field-usage-stats - 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/docs/api/doc/elasticsearch/operation/operation-indices-flush - 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/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge - 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/docs/api/doc/elasticsearch/operation/operation-indices-get - Get indices_get.NewGet - // Get aliases. - // Retrieves information for one or more data stream or index aliases. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias - 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/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle - 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/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle-stats - GetDataLifecycleStats indices_get_data_lifecycle_stats.NewGetDataLifecycleStats - // Get data streams. - // - // Get information about one or more data streams. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream - 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/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping - GetFieldMapping indices_get_field_mapping.NewGetFieldMapping - // Get index templates. - // Get information about one or more index templates. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template - 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/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping - 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/docs/api/doc/elasticsearch/group/endpoint-migration + 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 + DeleteDataStreamOptions indices_delete_data_stream_options.NewDeleteDataStreamOptions + 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 + GetDataStreamOptions indices_get_data_stream_options.NewGetDataStreamOptions + GetDataStreamSettings indices_get_data_stream_settings.NewGetDataStreamSettings + 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/docs/api/doc/elasticsearch/operation/operation-indices-get-settings - 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/docs/api/doc/elasticsearch/operation/operation-indices-get-template - 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/docs/api/doc/elasticsearch/operation/operation-indices-migrate-reindex - 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/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/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/docs/api/doc/elasticsearch/operation/operation-indices-open - 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/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/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/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/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/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping - 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/docs/api/doc/elasticsearch/operation/operation-indices-put-settings - 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/docs/api/doc/elasticsearch/operation/operation-indices-put-template - 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/docs/api/doc/elasticsearch/operation/operation-indices-recovery - 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/docs/api/doc/elasticsearch/operation/operation-indices-refresh - 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/docs/api/doc/elasticsearch/operation/operation-indices-reload-search-analyzers - 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/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster - 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/docs/api/doc/elasticsearch/operation/operation-indices-resolve-index - 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/docs/api/doc/elasticsearch/operation/operation-indices-rollover - 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/docs/api/doc/elasticsearch/operation/operation-indices-segments - 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/docs/api/doc/elasticsearch/operation/operation-indices-shard-stores - 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/docs/api/doc/elasticsearch/operation/operation-indices-shrink - 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/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template - 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/docs/api/doc/elasticsearch/operation/operation-indices-simulate-template - 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/docs/api/doc/elasticsearch/operation/operation-indices-split - 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/docs/api/doc/elasticsearch/operation/operation-indices-stats - Stats indices_stats.NewStats - // Create or update an alias. - // Adds a data stream or index to an alias. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases - UpdateAliases indices_update_aliases.NewUpdateAliases - // Validate a query. - // Validates a query without running it. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-validate-query - 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 + PutDataStreamOptions indices_put_data_stream_options.NewPutDataStreamOptions + PutDataStreamSettings indices_put_data_stream_settings.NewPutDataStreamSettings + 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 + RemoveBlock indices_remove_block.NewRemoveBlock + 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 + UpdateAliases indices_update_aliases.NewUpdateAliases + ValidateQuery indices_validate_query.NewValidateQuery } type Inference struct { - // Perform chat completion inference - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-unified-inference ChatCompletionUnified inference_chat_completion_unified.NewChatCompletionUnified - // Perform completion inference on the service - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference - Completion inference_completion.NewCompletion - // Delete an inference endpoint - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-delete - Delete inference_delete.NewDelete - // Get an inference endpoint - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get - 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/docs/api/doc/elasticsearch/operation/operation-inference-inference - 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/docs/api/doc/elasticsearch/operation/operation-inference-put - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-alibabacloud - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonbedrock - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-anthropic - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-azureaistudio - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-azureopenai - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-cohere - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-elasticsearch - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-elser - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-googleaistudio - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-googlevertexai - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-hugging-face - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-jinaai - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-mistral - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-openai - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-voyageai - 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/docs/api/doc/elasticsearch/operation/operation-inference-put-watsonx - PutWatsonx inference_put_watsonx.NewPutWatsonx - // Perform rereanking inference on the service - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference - Rerank inference_rerank.NewRerank - // Perform sparse embedding inference on the service - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference - 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/docs/api/doc/elasticsearch/operation/operation-inference-stream-inference - StreamCompletion inference_stream_completion.NewStreamCompletion - // Perform text embedding inference on the service - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference - 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/docs/api/doc/elasticsearch/operation/operation-inference-update - 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/operation/operation-ingest-delete-geoip-database - DeleteGeoipDatabase ingest_delete_geoip_database.NewDeleteGeoipDatabase - // Delete IP geolocation database configurations. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-ip-location-database + 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/docs/api/doc/elasticsearch/operation/operation-ingest-delete-pipeline - 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/docs/reference/enrich-processor/geoip-processor - 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/operation/operation-ingest-get-geoip-database - GetGeoipDatabase ingest_get_geoip_database.NewGetGeoipDatabase - // Get IP geolocation database configurations. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-ip-location-database - 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/docs/api/doc/elasticsearch/operation/operation-ingest-get-pipeline - 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/docs/reference/enrich-processor/grok-processor - 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/operation/operation-ingest-put-geoip-database - PutGeoipDatabase ingest_put_geoip_database.NewPutGeoipDatabase - // Create or update an IP geolocation database configuration. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-ip-location-database - PutIpLocationDatabase ingest_put_ip_location_database.NewPutIpLocationDatabase - // Create or update a pipeline. - // Changes made using this API take effect immediately. - // https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines - 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/docs/api/doc/elasticsearch/operation/operation-ingest-simulate - 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/docs/api/doc/elasticsearch/operation/operation-license-delete - 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/docs/api/doc/elasticsearch/operation/operation-license-get - Get license_get.NewGet - // Get the basic license status. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-basic-status + Delete license_delete.NewDelete + Get license_get.NewGet GetBasicStatus license_get_basic_status.NewGetBasicStatus - // Get the trial status. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-trial-status 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/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/docs/api/doc/elasticsearch/operation/operation-license-post-start-basic + 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/docs/api/doc/elasticsearch/operation/operation-license-post-start-trial 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/docs/api/doc/elasticsearch/operation/operation-logstash-delete-pipeline DeletePipeline logstash_delete_pipeline.NewDeletePipeline - // Get Logstash pipelines. - // Get pipelines that are used for Logstash Central Management. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-get-pipeline - 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/docs/api/doc/elasticsearch/operation/operation-logstash-put-pipeline - 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/docs/api/doc/elasticsearch/operation/operation-migration-deprecations - 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/docs/api/doc/elasticsearch/operation/operation-migration-get-feature-upgrade-status + 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/docs/api/doc/elasticsearch/operation/operation-migration-get-feature-upgrade-status - 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/docs/api/doc/elasticsearch/operation/operation-ml-clear-trained-model-deployment-cache 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/docs/api/doc/elasticsearch/operation/operation-ml-close-job - CloseJob ml_close_job.NewCloseJob - // Delete a calendar. - // - // Remove all scheduled events from a calendar, then delete it. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar - DeleteCalendar ml_delete_calendar.NewDeleteCalendar - // Delete events from a calendar. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar-event - DeleteCalendarEvent ml_delete_calendar_event.NewDeleteCalendarEvent - // Delete anomaly jobs from a calendar. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar-job - DeleteCalendarJob ml_delete_calendar_job.NewDeleteCalendarJob - // Delete a data frame analytics job. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-data-frame-analytics - DeleteDataFrameAnalytics ml_delete_data_frame_analytics.NewDeleteDataFrameAnalytics - // Delete a datafeed. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-datafeed - 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-expired-data - 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-filter - 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-forecast - 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-job - 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-model-snapshot - 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-trained-model - 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-trained-model-alias - 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/docs/api/doc/elasticsearch/operation/operation-ml-estimate-model-memory - 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/docs/api/doc/elasticsearch/operation/operation-ml-evaluate-data-frame - 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/docs/api/doc/elasticsearch/operation/operation-ml-explain-data-frame-analytics - 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/docs/api/doc/elasticsearch/operation/operation-ml-flush-job - 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/docs/api/doc/elasticsearch/operation/operation-ml-forecast - 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/docs/api/doc/elasticsearch/operation/operation-ml-get-buckets - GetBuckets ml_get_buckets.NewGetBuckets - // Get info about events in calendars. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-calendar-events - GetCalendarEvents ml_get_calendar_events.NewGetCalendarEvents - // Get calendar configuration info. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-calendars - GetCalendars ml_get_calendars.NewGetCalendars - // Get anomaly detection job results for categories. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-categories - 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/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics - GetDataFrameAnalytics ml_get_data_frame_analytics.NewGetDataFrameAnalytics - // Get data frame analytics jobs usage info. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics-stats - 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/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeed-stats - 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/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeeds - GetDatafeeds ml_get_datafeeds.NewGetDatafeeds - // Get filters. - // You can get a single filter or all filters. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-filters - 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/docs/api/doc/elasticsearch/operation/operation-ml-get-influencers - GetInfluencers ml_get_influencers.NewGetInfluencers - // Get anomaly detection jobs usage info. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-job-stats - 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/docs/api/doc/elasticsearch/operation/operation-ml-get-jobs - 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/docs/api/doc/elasticsearch/operation/operation-ml-get-memory-stats - GetMemoryStats ml_get_memory_stats.NewGetMemoryStats - // Get anomaly detection job model snapshot upgrade usage info. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshot-upgrade-stats - GetModelSnapshotUpgradeStats ml_get_model_snapshot_upgrade_stats.NewGetModelSnapshotUpgradeStats - // Get model snapshots info. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshots - 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/docs/api/doc/elasticsearch/operation/operation-ml-get-overall-buckets - 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/docs/api/doc/elasticsearch/operation/operation-ml-get-records - GetRecords ml_get_records.NewGetRecords - // Get trained model configuration info. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-trained-models - 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/docs/api/doc/elasticsearch/operation/operation-ml-get-trained-models-stats - GetTrainedModelsStats ml_get_trained_models_stats.NewGetTrainedModelsStats - // Evaluate a trained model. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-infer-trained-model - 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/docs/api/doc/elasticsearch/operation/operation-ml-info - 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/docs/api/doc/elasticsearch/operation/operation-ml-open-job - OpenJob ml_open_job.NewOpenJob - // Add scheduled events to the calendar. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-post-calendar-events - 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/docs/api/doc/elasticsearch/operation/operation-ml-post-data - 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/docs/api/doc/elasticsearch/operation/operation-ml-preview-data-frame-analytics - 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/docs/api/doc/elasticsearch/operation/operation-ml-preview-datafeed - PreviewDatafeed ml_preview_datafeed.NewPreviewDatafeed - // Create a calendar. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar - PutCalendar ml_put_calendar.NewPutCalendar - // Add anomaly detection job to calendar. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar-job - 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/docs/api/doc/elasticsearch/operation/operation-ml-put-data-frame-analytics - 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/docs/api/doc/elasticsearch/operation/operation-ml-put-datafeed - 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/docs/api/doc/elasticsearch/operation/operation-ml-put-filter - 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/docs/api/doc/elasticsearch/operation/operation-ml-put-job - 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/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model - 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/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-alias - PutTrainedModelAlias ml_put_trained_model_alias.NewPutTrainedModelAlias - // Create part of a trained model definition. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-definition-part - 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/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-vocabulary - 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/docs/api/doc/elasticsearch/operation/operation-ml-reset-job - 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/docs/api/doc/elasticsearch/operation/operation-ml-revert-model-snapshot - 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/docs/api/doc/elasticsearch/operation/operation-ml-set-upgrade-mode - 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/docs/api/doc/elasticsearch/operation/operation-ml-start-data-frame-analytics - 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/docs/api/doc/elasticsearch/operation/operation-ml-start-datafeed - StartDatafeed ml_start_datafeed.NewStartDatafeed - // Start a trained model deployment. - // It allocates the model to every machine learning node. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-trained-model-deployment - 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/docs/api/doc/elasticsearch/operation/operation-ml-stop-data-frame-analytics - 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/docs/api/doc/elasticsearch/operation/operation-ml-stop-datafeed - StopDatafeed ml_stop_datafeed.NewStopDatafeed - // Stop a trained model deployment. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-trained-model-deployment - StopTrainedModelDeployment ml_stop_trained_model_deployment.NewStopTrainedModelDeployment - // Update a data frame analytics job. - // https://www.elastic.co/docs/api/doc/elasticsearch/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/docs/api/doc/elasticsearch/operation/operation-ml-update-datafeed - 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/docs/api/doc/elasticsearch/operation/operation-ml-update-filter - UpdateFilter ml_update_filter.NewUpdateFilter - // Update an anomaly detection job. - // Updates certain properties of an anomaly detection job. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-job - UpdateJob ml_update_job.NewUpdateJob - // Update a snapshot. - // Updates certain properties of a snapshot. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-model-snapshot - UpdateModelSnapshot ml_update_model_snapshot.NewUpdateModelSnapshot - // Update a trained model deployment. - // https://www.elastic.co/docs/api/doc/elasticsearch/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/docs/api/doc/elasticsearch/operation/operation-ml-upgrade-job-snapshot - 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 - 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 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/docs/api/doc/elasticsearch/operation/operation-nodes-clear-repositories-metering-archive 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/docs/api/doc/elasticsearch/operation/operation-nodes-get-repositories-metering-info - 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/docs/api/doc/elasticsearch/operation/operation-nodes-hot-threads - 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/docs/api/doc/elasticsearch/operation/operation-nodes-info - 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/docs/api/doc/elasticsearch/operation/operation-nodes-reload-secure-settings - 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/docs/api/doc/elasticsearch/operation/operation-nodes-stats - Stats nodes_stats.NewStats - // Get feature usage information. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-usage - 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/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-rule - 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/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-ruleset + 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/docs/api/doc/elasticsearch/operation/operation-query-rules-get-rule - GetRule query_rules_get_rule.NewGetRule - // Get a query ruleset. - // Get details about a query ruleset. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-ruleset - GetRuleset query_rules_get_ruleset.NewGetRuleset - // Get all query rulesets. - // Get summarized information about the query rulesets. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-list-rulesets - 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/docs/api/doc/elasticsearch/operation/operation-query-rules-put-rule - 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/docs/api/doc/elasticsearch/operation/operation-query-rules-put-ruleset - 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/docs/api/doc/elasticsearch/operation/operation-query-rules-test - 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/docs/api/doc/elasticsearch/operation/operation-rollup-delete-job - 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/docs/api/doc/elasticsearch/operation/operation-rollup-get-jobs - 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/docs/api/doc/elasticsearch/operation/operation-rollup-get-rollup-caps - 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/docs/api/doc/elasticsearch/operation/operation-rollup-get-rollup-index-caps + 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/docs/api/doc/elasticsearch/operation/operation-rollup-put-job - 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/docs/api/doc/elasticsearch/operation/operation-rollup-rollup-search - 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/docs/api/doc/elasticsearch/operation/operation-rollup-start-job - 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/docs/api/doc/elasticsearch/operation/operation-rollup-stop-job - 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/docs/api/doc/elasticsearch/operation/operation-search-application-delete - Delete search_application_delete.NewDelete - // Delete a behavioral analytics collection. - // The associated data stream is also deleted. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete-behavioral-analytics - DeleteBehavioralAnalytics search_application_delete_behavioral_analytics.NewDeleteBehavioralAnalytics - // Get search application details. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get - Get search_application_get.NewGet - // Get behavioral analytics collections. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics - GetBehavioralAnalytics search_application_get_behavioral_analytics.NewGetBehavioralAnalytics - // Get search applications. - // Get information about search applications. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics - List search_application_list.NewList - // Create a behavioral analytics collection event. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-post-behavioral-analytics-event + 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/docs/api/doc/elasticsearch/operation/operation-search-application-put - Put search_application_put.NewPut - // Create a behavioral analytics collection. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put-behavioral-analytics - 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/docs/api/doc/elasticsearch/operation/operation-search-application-render-query - 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/docs/api/doc/elasticsearch/operation/operation-search-application-search - 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/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-cache-stats 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/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-clear-cache 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/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-mount - Mount searchable_snapshots_mount.NewMount - // Get searchable snapshot statistics. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-stats - 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/docs/api/doc/elasticsearch/operation/operation-security-activate-user-profile - 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/docs/api/doc/elasticsearch/operation/operation-security-authenticate - 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/docs/api/doc/elasticsearch/operation/operation-security-bulk-delete-role - 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/docs/api/doc/elasticsearch/operation/operation-security-bulk-put-role - 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/docs/api/doc/elasticsearch/operation/operation-security-bulk-update-api-keys - 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/docs/api/doc/elasticsearch/operation/operation-security-change-password - 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/docs/api/doc/elasticsearch/operation/operation-security-clear-api-key-cache - 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/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-privileges - 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/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-realms - ClearCachedRealms security_clear_cached_realms.NewClearCachedRealms - // Clear the roles cache. - // - // Evict roles from the native role cache. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-roles - 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/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-service-tokens - 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/docs/api/doc/elasticsearch/operation/operation-security-create-api-key - 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/docs/api/doc/elasticsearch/operation/operation-security-create-cross-cluster-api-key - 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/docs/api/doc/elasticsearch/operation/operation-security-create-service-token - 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/docs/api/doc/elasticsearch/operation/operation-security-delegate-pki - 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/docs/api/doc/elasticsearch/operation/operation-security-delete-privileges - 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/docs/api/doc/elasticsearch/operation/operation-security-delete-role - 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/docs/api/doc/elasticsearch/operation/operation-security-delete-role-mapping - 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/docs/api/doc/elasticsearch/operation/operation-security-delete-service-token - DeleteServiceToken security_delete_service_token.NewDeleteServiceToken - // Delete users. - // - // Delete users from the native realm. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-user - 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/docs/api/doc/elasticsearch/operation/operation-security-disable-user - 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/docs/api/doc/elasticsearch/operation/operation-security-disable-user-profile - 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/docs/api/doc/elasticsearch/operation/operation-security-enable-user - 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/docs/api/doc/elasticsearch/operation/operation-security-enable-user-profile - 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/docs/api/doc/elasticsearch/operation/operation-security-enroll-kibana - 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/docs/api/doc/elasticsearch/operation/operation-security-enroll-node - 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/docs/api/doc/elasticsearch/operation/operation-security-get-api-key - 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/docs/api/doc/elasticsearch/operation/operation-security-get-builtin-privileges - 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/docs/api/doc/elasticsearch/operation/operation-security-get-privileges - 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/docs/api/doc/elasticsearch/operation/operation-security-get-role - 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/docs/api/doc/elasticsearch/operation/operation-security-get-role-mapping - 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/docs/api/doc/elasticsearch/operation/operation-security-get-service-accounts - 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/docs/api/doc/elasticsearch/operation/operation-security-get-service-credentials - 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/docs/api/doc/elasticsearch/operation/operation-security-get-settings - 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/docs/api/doc/elasticsearch/operation/operation-security-get-token - GetToken security_get_token.NewGetToken - // Get users. - // - // Get information about users in the native realm and built-in users. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user - 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/docs/api/doc/elasticsearch/operation/operation-security-get-user-privileges - 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/docs/api/doc/elasticsearch/operation/operation-security-get-user-profile - 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/docs/api/doc/elasticsearch/operation/operation-security-grant-api-key - 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/docs/api/doc/elasticsearch/operation/operation-security-has-privileges - 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/docs/api/doc/elasticsearch/operation/operation-security-has-privileges-user-profile - 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/docs/api/doc/elasticsearch/operation/operation-security-invalidate-api-key - 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/docs/api/doc/elasticsearch/operation/operation-security-invalidate-token - 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/docs/api/doc/elasticsearch/operation/operation-security-oidc-authenticate - 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/docs/api/doc/elasticsearch/operation/operation-security-oidc-logout - 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/docs/api/doc/elasticsearch/operation/operation-security-oidc-prepare-authentication - 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/docs/api/doc/elasticsearch/operation/operation-security-put-privileges - 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/docs/api/doc/elasticsearch/operation/operation-security-put-role - 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/docs/api/doc/elasticsearch/operation/operation-security-put-role-mapping - 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/docs/api/doc/elasticsearch/operation/operation-security-put-user - 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/docs/api/doc/elasticsearch/operation/operation-security-query-api-keys - 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/docs/api/doc/elasticsearch/operation/operation-security-query-role - 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/docs/api/doc/elasticsearch/operation/operation-security-query-user - 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/docs/api/doc/elasticsearch/operation/operation-security-saml-authenticate - 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/docs/api/doc/elasticsearch/operation/operation-security-saml-complete-logout - 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/docs/api/doc/elasticsearch/operation/operation-security-saml-invalidate - 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/docs/api/doc/elasticsearch/operation/operation-security-saml-logout - 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/docs/api/doc/elasticsearch/operation/operation-security-saml-prepare-authentication - 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/docs/api/doc/elasticsearch/operation/operation-security-saml-service-provider-metadata + 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/docs/api/doc/elasticsearch/operation/operation-security-suggest-user-profiles - 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/docs/api/doc/elasticsearch/operation/operation-security-update-api-key - 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/docs/api/doc/elasticsearch/operation/operation-security-update-cross-cluster-api-key - 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/docs/api/doc/elasticsearch/operation/operation-security-update-settings - 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/docs/api/doc/elasticsearch/operation/operation-security-update-user-profile-data - 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/docs/api/doc/elasticsearch/operation/operation-shutdown-delete-node 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/docs/api/doc/elasticsearch/operation/operation-shutdown-get-node - 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/docs/api/doc/elasticsearch/operation/operation-shutdown-put-node - 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/docs/api/doc/elasticsearch/operation/operation-simulate-ingest 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/docs/api/doc/elasticsearch/operation/operation-slm-delete-lifecycle - 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/docs/api/doc/elasticsearch/operation/operation-slm-execute-lifecycle + 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/docs/api/doc/elasticsearch/operation/operation-slm-execute-retention ExecuteRetention slm_execute_retention.NewExecuteRetention - // Get policy information. - // Get snapshot lifecycle policy definitions and information about the latest - // snapshot attempts. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-lifecycle - 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/docs/api/doc/elasticsearch/operation/operation-slm-get-stats - GetStats slm_get_stats.NewGetStats - // Get the snapshot lifecycle management status. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-status - 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/docs/api/doc/elasticsearch/operation/operation-slm-put-lifecycle - 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/docs/api/doc/elasticsearch/operation/operation-slm-start - 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/docs/api/doc/elasticsearch/operation/operation-slm-stop - 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/docs/api/doc/elasticsearch/operation/operation-snapshot-cleanup-repository - 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/docs/api/doc/elasticsearch/operation/operation-snapshot-clone - Clone snapshot_clone.NewClone - // Create a snapshot. - // Take a snapshot of a cluster or of data streams and indices. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create - 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. - // - // Several options for this API can be specified using a query parameter or a - // request body parameter. - // If both parameters are specified, only the query parameter is used. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create-repository - CreateRepository snapshot_create_repository.NewCreateRepository - // Delete snapshots. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-delete - 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/docs/api/doc/elasticsearch/operation/operation-snapshot-delete-repository - DeleteRepository snapshot_delete_repository.NewDeleteRepository - // Get snapshot information. - // - // NOTE: The `after` parameter and `next` field enable you to iterate through - // snapshots with some consistency guarantees regarding concurrent creation or - // deletion of snapshots. - // It is guaranteed that any snapshot that exists at the beginning of the - // iteration and is not concurrently deleted will be seen during the iteration. - // Snapshots concurrently created may be seen during an iteration. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get - Get snapshot_get.NewGet - // Get snapshot repository information. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get-repository - 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/docs/api/doc/elasticsearch/operation/operation-snapshot-repository-analyze - 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. - // - // The default values for the parameters of this API are designed to limit the - // impact of the integrity verification on other activities in your cluster. - // For instance, by default it will only use at most half of the `snapshot_meta` - // threads to verify the integrity of each snapshot, allowing other snapshot - // operations to use the other half of this thread pool. - // If you modify these parameters to speed up the verification process, you risk - // disrupting other snapshot-related operations in your cluster. - // For large repositories, consider setting up a separate single-node - // Elasticsearch cluster just for running the integrity verification API. - // - // 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. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-repository-verify-integrity + 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/docs/api/doc/elasticsearch/operation/operation-snapshot-restore - 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. - // - // If you omit the `` request path parameter, the request retrieves - // information only for currently running snapshots. - // This usage is preferred. - // If needed, you can specify `` and `` to retrieve - // information for specific snapshots, even if they're not currently running. - // - // 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/docs/api/doc/elasticsearch/operation/operation-snapshot-status - Status snapshot_status.NewStatus - // Verify a snapshot repository. - // Check for common misconfigurations in a snapshot repository. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-verify-repository - 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/docs/api/doc/elasticsearch/operation/operation-sql-clear-cursor - 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/docs/api/doc/elasticsearch/operation/operation-sql-delete-async - 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/docs/api/doc/elasticsearch/operation/operation-sql-get-async - 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/docs/api/doc/elasticsearch/operation/operation-sql-get-async-status + 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/docs/api/doc/elasticsearch/operation/operation-sql-query - 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/docs/api/doc/elasticsearch/operation/operation-sql-translate - 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/docs/api/doc/elasticsearch/operation/operation-ssl-certificates 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/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym - DeleteSynonym synonyms_delete_synonym.NewDeleteSynonym - // Delete a synonym rule. - // Delete a synonym rule from a synonym set. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule + DeleteSynonym synonyms_delete_synonym.NewDeleteSynonym DeleteSynonymRule synonyms_delete_synonym_rule.NewDeleteSynonymRule - // Get a synonym set. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym - GetSynonym synonyms_get_synonym.NewGetSynonym - // Get a synonym rule. - // Get a synonym rule from a synonym set. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule - GetSynonymRule synonyms_get_synonym_rule.NewGetSynonymRule - // Get all synonym sets. - // Get a summary of all defined synonym sets. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym - 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/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym - 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/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym-rule - 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/docs/api/doc/elasticsearch/group/endpoint-tasks 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/docs/api/doc/elasticsearch/group/endpoint-tasks - 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/docs/api/doc/elasticsearch/group/endpoint-tasks - 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/docs/api/doc/elasticsearch/group/endpoint-text_structure - 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/docs/api/doc/elasticsearch/operation/operation-text-structure-find-message-structure + 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/docs/api/doc/elasticsearch/operation/operation-text-structure-find-structure - 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/docs/api/doc/elasticsearch/operation/operation-text-structure-test-grok-pattern - 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/docs/api/doc/elasticsearch/operation/operation-transform-delete-transform - 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/docs/api/doc/elasticsearch/operation/operation-transform-get-transform - GetTransform transform_get_transform.NewGetTransform - // Get transform stats. - // - // Get usage information for transforms. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform-stats - 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/docs/api/doc/elasticsearch/operation/operation-transform-preview-transform - 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/docs/api/doc/elasticsearch/operation/operation-transform-put-transform - 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/docs/api/doc/elasticsearch/operation/operation-transform-reset-transform - 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/docs/api/doc/elasticsearch/operation/operation-transform-schedule-now-transform + 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/docs/api/doc/elasticsearch/operation/operation-transform-start-transform - StartTransform transform_start_transform.NewStartTransform - // Stop transforms. - // Stops one or more transforms. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-stop-transform - 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/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/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/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/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/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/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/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/operation/operation-watcher-get-settings - GetSettings watcher_get_settings.NewGetSettings - // Get a watch. - // https://www.elastic.co/docs/api/doc/elasticsearch/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/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/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/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/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/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/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/docs/api/doc/elasticsearch/operation/operation-info - 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/group/endpoint-xpack + Info xpack_info.NewInfo Usage xpack_usage.NewUsage } @@ -8595,6 +1304,7 @@ type API struct { Snapshot Snapshot Sql Sql Ssl Ssl + Streams Streams Synonyms Synonyms Tasks Tasks TextStructure TextStructure @@ -8602,1891 +1312,53 @@ 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/docs/api/doc/elasticsearch/operation/operation-bulk - Bulk core_bulk.NewBulk - // Clear a scrolling search. - // Clear the search context and results for a scrolling search. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll - 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/docs/api/doc/elasticsearch/operation/operation-open-point-in-time - 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/docs/api/doc/elasticsearch/operation/operation-count - 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/docs/api/doc/elasticsearch/operation/operation-create - 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/docs/api/doc/elasticsearch/operation/operation-delete - 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/docs/api/doc/elasticsearch/operation/operation-delete-by-query - 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/docs/api/doc/elasticsearch/operation/operation-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/docs/api/doc/elasticsearch/operation/operation-delete-script - 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/docs/api/doc/elasticsearch/operation/operation-get - 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/docs/api/doc/elasticsearch/operation/operation-get - 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/docs/api/doc/elasticsearch/operation/operation-explain - 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/docs/api/doc/elasticsearch/operation/operation-field-caps - 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/docs/api/doc/elasticsearch/operation/operation-get - Get core_get.NewGet - // Get a script or search template. - // Retrieves a stored script or search template. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script - GetScript core_get_script.NewGetScript - // Get script contexts. - // - // Get a list of supported script contexts and their methods. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-context - GetScriptContext core_get_script_context.NewGetScriptContext - // Get script languages. - // - // Get a list of available script types, languages, and contexts. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-languages - 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/docs/api/doc/elasticsearch/operation/operation-get - 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/docs/api/doc/elasticsearch/operation/operation-health-report - 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/docs/api/doc/elasticsearch/operation/operation-create - Index core_index.NewIndex - // Get cluster info. - // Get basic build, version, and cluster information. - // https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-info - Info core_info.NewInfo - // 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/docs/api/doc/elasticsearch/operation/operation-mget - 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/docs/api/doc/elasticsearch/operation/operation-msearch - 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/docs/api/doc/elasticsearch/operation/operation-msearch-template - 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/docs/api/doc/elasticsearch/operation/operation-mtermvectors - 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/docs/api/doc/elasticsearch/operation/operation-open-point-in-time - OpenPointInTime core_open_point_in_time.NewOpenPointInTime - // Ping the cluster. - // Get information about whether the cluster is running. - // https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster - 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/docs/api/doc/elasticsearch/operation/operation-put-script - 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/docs/api/doc/elasticsearch/operation/operation-rank-eval - 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/docs/api/doc/elasticsearch/operation/operation-reindex - 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/docs/api/doc/elasticsearch/operation/operation-reindex - ReindexRethrottle core_reindex_rethrottle.NewReindexRethrottle - // Render a search template. - // - // Render a search template as a search request body. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-render-search-template - 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/docs/reference/scripting-languages/painless/painless-api-examples - 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/docs/api/doc/elasticsearch/operation/operation-scroll - 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/docs/api/doc/elasticsearch/operation/operation-search - 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/docs/api/doc/elasticsearch/operation/operation-search-mvt - 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/docs/api/doc/elasticsearch/operation/operation-search-shards - SearchShards core_search_shards.NewSearchShards - // Run a search with a search template. - // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-template - 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/docs/api/doc/elasticsearch/operation/operation-terms-enum - 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/docs/api/doc/elasticsearch/operation/operation-termvectors - 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/docs/api/doc/elasticsearch/operation/operation-update - 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/docs/api/doc/elasticsearch/operation/operation-update-by-query - 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/docs/api/doc/elasticsearch/operation/operation-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 + 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), @@ -10494,7 +1366,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), @@ -10502,12 +1373,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), @@ -10537,7 +1406,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), @@ -10554,7 +1422,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), @@ -10574,7 +1441,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), @@ -10609,7 +1475,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), @@ -10656,14 +1521,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), @@ -10672,7 +1535,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), @@ -10680,7 +1542,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), @@ -10691,13 +1552,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), @@ -10705,12 +1564,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), @@ -10725,7 +1582,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), @@ -10741,6 +1597,7 @@ func New(tp elastictransport.Interface) *API { DeleteAlias: indices_delete_alias.NewDeleteAliasFunc(tp), DeleteDataLifecycle: indices_delete_data_lifecycle.NewDeleteDataLifecycleFunc(tp), DeleteDataStream: indices_delete_data_stream.NewDeleteDataStreamFunc(tp), + DeleteDataStreamOptions: indices_delete_data_stream_options.NewDeleteDataStreamOptionsFunc(tp), DeleteIndexTemplate: indices_delete_index_template.NewDeleteIndexTemplateFunc(tp), DeleteTemplate: indices_delete_template.NewDeleteTemplateFunc(tp), DiskUsage: indices_disk_usage.NewDiskUsageFunc(tp), @@ -10758,6 +1615,8 @@ func New(tp elastictransport.Interface) *API { GetDataLifecycle: indices_get_data_lifecycle.NewGetDataLifecycleFunc(tp), GetDataLifecycleStats: indices_get_data_lifecycle_stats.NewGetDataLifecycleStatsFunc(tp), GetDataStream: indices_get_data_stream.NewGetDataStreamFunc(tp), + GetDataStreamOptions: indices_get_data_stream_options.NewGetDataStreamOptionsFunc(tp), + GetDataStreamSettings: indices_get_data_stream_settings.NewGetDataStreamSettingsFunc(tp), GetFieldMapping: indices_get_field_mapping.NewGetFieldMappingFunc(tp), GetIndexTemplate: indices_get_index_template.NewGetIndexTemplateFunc(tp), GetMapping: indices_get_mapping.NewGetMappingFunc(tp), @@ -10771,6 +1630,8 @@ func New(tp elastictransport.Interface) *API { PromoteDataStream: indices_promote_data_stream.NewPromoteDataStreamFunc(tp), PutAlias: indices_put_alias.NewPutAliasFunc(tp), PutDataLifecycle: indices_put_data_lifecycle.NewPutDataLifecycleFunc(tp), + PutDataStreamOptions: indices_put_data_stream_options.NewPutDataStreamOptionsFunc(tp), + PutDataStreamSettings: indices_put_data_stream_settings.NewPutDataStreamSettingsFunc(tp), PutIndexTemplate: indices_put_index_template.NewPutIndexTemplateFunc(tp), PutMapping: indices_put_mapping.NewPutMappingFunc(tp), PutSettings: indices_put_settings.NewPutSettingsFunc(tp), @@ -10778,6 +1639,7 @@ func New(tp elastictransport.Interface) *API { Recovery: indices_recovery.NewRecoveryFunc(tp), Refresh: indices_refresh.NewRefreshFunc(tp), ReloadSearchAnalyzers: indices_reload_search_analyzers.NewReloadSearchAnalyzersFunc(tp), + RemoveBlock: indices_remove_block.NewRemoveBlockFunc(tp), ResolveCluster: indices_resolve_cluster.NewResolveClusterFunc(tp), ResolveIndex: indices_resolve_index.NewResolveIndexFunc(tp), Rollover: indices_rollover.NewRolloverFunc(tp), @@ -10792,7 +1654,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), @@ -10802,10 +1663,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), @@ -10823,7 +1687,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), @@ -10839,7 +1702,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), @@ -10850,21 +1712,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), @@ -10941,12 +1800,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), @@ -10957,7 +1814,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), @@ -10965,7 +1821,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), @@ -10977,7 +1832,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), @@ -10989,7 +1843,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), @@ -11003,7 +1856,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), @@ -11011,7 +1863,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), @@ -11079,19 +1930,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), @@ -11104,7 +1952,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), @@ -11121,7 +1968,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), @@ -11131,12 +1977,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), @@ -11147,14 +1997,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), @@ -11162,7 +2010,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), @@ -11178,7 +2025,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), @@ -11195,7 +2041,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), @@ -11246,3 +2091,12050 @@ func New(tp elastictransport.Interface) *API { UpdateByQueryRethrottle: core_update_by_query_rethrottle.NewUpdateByQueryRethrottleFunc(tp), } } + +type MethodAsyncSearch struct { + tp elastictransport.Interface +} + +type MethodAutoscaling struct { + tp elastictransport.Interface +} + +type MethodCapabilities struct { + tp elastictransport.Interface +} + +type MethodCat struct { + tp elastictransport.Interface +} + +type MethodCcr struct { + tp elastictransport.Interface +} + +type MethodCluster struct { + tp elastictransport.Interface +} + +type MethodConnector struct { + tp elastictransport.Interface +} + +type MethodCore struct { + tp elastictransport.Interface +} + +type MethodDanglingIndices struct { + tp elastictransport.Interface +} + +type MethodEnrich struct { + tp elastictransport.Interface +} + +type MethodEql struct { + tp elastictransport.Interface +} + +type MethodEsql struct { + tp elastictransport.Interface +} + +type MethodFeatures struct { + tp elastictransport.Interface +} + +type MethodFleet struct { + tp elastictransport.Interface +} + +type MethodGraph struct { + tp elastictransport.Interface +} + +type MethodIlm struct { + tp elastictransport.Interface +} + +type MethodIndices struct { + tp elastictransport.Interface +} + +type MethodInference struct { + tp elastictransport.Interface +} + +type MethodIngest struct { + tp elastictransport.Interface +} + +type MethodLicense struct { + tp elastictransport.Interface +} + +type MethodLogstash struct { + tp elastictransport.Interface +} + +type MethodMigration struct { + tp elastictransport.Interface +} + +type MethodMl struct { + tp elastictransport.Interface +} + +type MethodMonitoring struct { + tp elastictransport.Interface +} + +type MethodNodes struct { + tp elastictransport.Interface +} + +type MethodProfiling struct { + tp elastictransport.Interface +} + +type MethodQueryRules struct { + tp elastictransport.Interface +} + +type MethodRollup struct { + tp elastictransport.Interface +} + +type MethodSearchApplication struct { + tp elastictransport.Interface +} + +type MethodSearchableSnapshots struct { + tp elastictransport.Interface +} + +type MethodSecurity struct { + tp elastictransport.Interface +} + +type MethodShutdown struct { + tp elastictransport.Interface +} + +type MethodSimulate struct { + tp elastictransport.Interface +} + +type MethodSlm struct { + tp elastictransport.Interface +} + +type MethodSnapshot struct { + tp elastictransport.Interface +} + +type MethodSql struct { + tp elastictransport.Interface +} + +type MethodSsl struct { + tp elastictransport.Interface +} + +type MethodStreams struct { + tp elastictransport.Interface +} + +type MethodSynonyms struct { + tp elastictransport.Interface +} + +type MethodTasks struct { + tp elastictransport.Interface +} + +type MethodTextStructure struct { + tp elastictransport.Interface +} + +type MethodTransform struct { + tp elastictransport.Interface +} + +type MethodWatcher struct { + tp elastictransport.Interface +} + +type MethodXpack struct { + tp elastictransport.Interface +} + +type MethodAPI struct { + tp elastictransport.Interface + AsyncSearch MethodAsyncSearch + Autoscaling MethodAutoscaling + Capabilities MethodCapabilities + Cat MethodCat + Ccr MethodCcr + Cluster MethodCluster + Connector MethodConnector + Core MethodCore + DanglingIndices MethodDanglingIndices + Enrich MethodEnrich + Eql MethodEql + Esql MethodEsql + Features MethodFeatures + Fleet MethodFleet + Graph MethodGraph + Ilm MethodIlm + Indices MethodIndices + Inference MethodInference + Ingest MethodIngest + License MethodLicense + Logstash MethodLogstash + Migration MethodMigration + Ml MethodMl + Monitoring MethodMonitoring + Nodes MethodNodes + Profiling MethodProfiling + QueryRules MethodQueryRules + Rollup MethodRollup + SearchApplication MethodSearchApplication + SearchableSnapshots MethodSearchableSnapshots + Security MethodSecurity + Shutdown MethodShutdown + Simulate MethodSimulate + Slm MethodSlm + Snapshot MethodSnapshot + Sql MethodSql + Ssl MethodSsl + Streams MethodStreams + Synonyms MethodSynonyms + Tasks MethodTasks + TextStructure MethodTextStructure + Transform MethodTransform + Watcher MethodWatcher + Xpack MethodXpack +} + +// 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. +// +// You might want to disable the refresh interval temporarily to improve +// indexing throughput for large bulk requests. +// Refer to the linked documentation for step-by-step instructions using the +// index settings API. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk +func (p *MethodAPI) Bulk() *core_bulk.Bulk { + _bulk := core_bulk.NewBulkFunc(p.tp) + return _bulk() +} + +// Clear a scrolling search. +// Clear the search context and results for a scrolling search. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll +func (p *MethodAPI) ClearScroll() *core_clear_scroll.ClearScroll { + _clearscroll := core_clear_scroll.NewClearScrollFunc(p.tp) + return _clearscroll() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-open-point-in-time +func (p *MethodAPI) ClosePointInTime() *core_close_point_in_time.ClosePointInTime { + _closepointintime := core_close_point_in_time.NewClosePointInTimeFunc(p.tp) + return _closepointintime() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-count +func (p *MethodAPI) Count() *core_count.Count { + _count := core_count.NewCountFunc(p.tp) + return _count() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-create +func (p *MethodAPI) Create(index, id string) *core_create.Create { + _create := core_create.NewCreateFunc(p.tp) + return _create(index, id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-delete +func (p *MethodAPI) Delete(index, id string) *core_delete.Delete { + _delete := core_delete.NewDeleteFunc(p.tp) + return _delete(index, id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-delete-by-query +func (p *MethodAPI) DeleteByQuery(index string) *core_delete_by_query.DeleteByQuery { + _deletebyquery := core_delete_by_query.NewDeleteByQueryFunc(p.tp) + return _deletebyquery(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-delete-by-query-rethrottle +func (p *MethodAPI) DeleteByQueryRethrottle(taskid string) *core_delete_by_query_rethrottle.DeleteByQueryRethrottle { + _deletebyqueryrethrottle := core_delete_by_query_rethrottle.NewDeleteByQueryRethrottleFunc(p.tp) + return _deletebyqueryrethrottle(taskid) +} + +// Delete a script or search template. +// Deletes a stored script or search template. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-script +func (p *MethodAPI) DeleteScript(id string) *core_delete_script.DeleteScript { + _deletescript := core_delete_script.NewDeleteScriptFunc(p.tp) + return _deletescript(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-get +func (p *MethodAPI) Exists(index, id string) *core_exists.Exists { + _exists := core_exists.NewExistsFunc(p.tp) + return _exists(index, id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-get +func (p *MethodAPI) ExistsSource(index, id string) *core_exists_source.ExistsSource { + _existssource := core_exists_source.NewExistsSourceFunc(p.tp) + return _existssource(index, id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-explain +func (p *MethodAPI) Explain(index, id string) *core_explain.Explain { + _explain := core_explain.NewExplainFunc(p.tp) + return _explain(index, id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-field-caps +func (p *MethodAPI) FieldCaps() *core_field_caps.FieldCaps { + _fieldcaps := core_field_caps.NewFieldCapsFunc(p.tp) + return _fieldcaps() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-get +func (p *MethodAPI) Get(index, id string) *core_get.Get { + _get := core_get.NewGetFunc(p.tp) + return _get(index, id) +} + +// Get a script or search template. +// Retrieves a stored script or search template. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script +func (p *MethodAPI) GetScript(id string) *core_get_script.GetScript { + _getscript := core_get_script.NewGetScriptFunc(p.tp) + return _getscript(id) +} + +// Get script contexts. +// +// Get a list of supported script contexts and their methods. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-context +func (p *MethodAPI) GetScriptContext() *core_get_script_context.GetScriptContext { + _getscriptcontext := core_get_script_context.NewGetScriptContextFunc(p.tp) + return _getscriptcontext() +} + +// Get script languages. +// +// Get a list of available script types, languages, and contexts. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-languages +func (p *MethodAPI) GetScriptLanguages() *core_get_script_languages.GetScriptLanguages { + _getscriptlanguages := core_get_script_languages.NewGetScriptLanguagesFunc(p.tp) + return _getscriptlanguages() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-get +func (p *MethodAPI) GetSource(index, id string) *core_get_source.GetSource { + _getsource := core_get_source.NewGetSourceFunc(p.tp) + return _getsource(index, id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-health-report +func (p *MethodAPI) HealthReport() *core_health_report.HealthReport { + _healthreport := core_health_report.NewHealthReportFunc(p.tp) + return _healthreport() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-create +func (p *MethodAPI) Index(index string) *core_index.Index { + _index := core_index.NewIndexFunc(p.tp) + return _index(index) +} + +// 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/docs/api/doc/elasticsearch/group/endpoint-info +func (p *MethodAPI) Info() *core_info.Info { + _info := core_info.NewInfoFunc(p.tp) + return _info() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-mget +func (p *MethodAPI) Mget() *core_mget.Mget { + _mget := core_mget.NewMgetFunc(p.tp) + return _mget() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-msearch +func (p *MethodAPI) Msearch() *core_msearch.Msearch { + _msearch := core_msearch.NewMsearchFunc(p.tp) + return _msearch() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-msearch-template +func (p *MethodAPI) MsearchTemplate() *core_msearch_template.MsearchTemplate { + _msearchtemplate := core_msearch_template.NewMsearchTemplateFunc(p.tp) + return _msearchtemplate() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-mtermvectors +func (p *MethodAPI) Mtermvectors() *core_mtermvectors.Mtermvectors { + _mtermvectors := core_mtermvectors.NewMtermvectorsFunc(p.tp) + return _mtermvectors() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-open-point-in-time +func (p *MethodAPI) OpenPointInTime(index string) *core_open_point_in_time.OpenPointInTime { + _openpointintime := core_open_point_in_time.NewOpenPointInTimeFunc(p.tp) + return _openpointintime(index) +} + +// Ping the cluster. +// Get information about whether the cluster is running. +// https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster +func (p *MethodAPI) Ping() *core_ping.Ping { + _ping := core_ping.NewPingFunc(p.tp) + return _ping() +} + +// Create or update a script or search template. +// Creates or updates a stored script or search template. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-script +func (p *MethodAPI) PutScript(id string) *core_put_script.PutScript { + _putscript := core_put_script.NewPutScriptFunc(p.tp) + return _putscript(id) +} + +// Evaluate ranked search results. +// +// Evaluate the quality of ranked search results over a set of typical search +// queries. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rank-eval +func (p *MethodAPI) RankEval() *core_rank_eval.RankEval { + _rankeval := core_rank_eval.NewRankEvalFunc(p.tp) + return _rankeval() +} + +// 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. +// +// Refer to the linked documentation for examples of how to reindex documents. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex +func (p *MethodAPI) Reindex() *core_reindex.Reindex { + _reindex := core_reindex.NewReindexFunc(p.tp) + return _reindex() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-reindex +func (p *MethodAPI) ReindexRethrottle(taskid string) *core_reindex_rethrottle.ReindexRethrottle { + _reindexrethrottle := core_reindex_rethrottle.NewReindexRethrottleFunc(p.tp) + return _reindexrethrottle(taskid) +} + +// Render a search template. +// +// Render a search template as a search request body. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-render-search-template +func (p *MethodAPI) RenderSearchTemplate() *core_render_search_template.RenderSearchTemplate { + _rendersearchtemplate := core_render_search_template.NewRenderSearchTemplateFunc(p.tp) + return _rendersearchtemplate() +} + +// 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/docs/reference/scripting-languages/painless/painless-api-examples +func (p *MethodAPI) ScriptsPainlessExecute() *core_scripts_painless_execute.ScriptsPainlessExecute { + _scriptspainlessexecute := core_scripts_painless_execute.NewScriptsPainlessExecuteFunc(p.tp) + return _scriptspainlessexecute() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-scroll +func (p *MethodAPI) Scroll() *core_scroll.Scroll { + _scroll := core_scroll.NewScrollFunc(p.tp) + return _scroll() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-search +func (p *MethodAPI) Search() *core_search.Search { + _search := core_search.NewSearchFunc(p.tp) + return _search() +} + +// 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. +// +// 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. +// +// Learn how to use the vector tile search API with practical examples in the +// [Vector tile search +// examples](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/vector-tile-search) +// guide. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-mvt +func (p *MethodAPI) SearchMvt(index, field, zoom, x, y string) *core_search_mvt.SearchMvt { + _searchmvt := core_search_mvt.NewSearchMvtFunc(p.tp) + return _searchmvt(index, field, zoom, x, y) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-search-shards +func (p *MethodAPI) SearchShards() *core_search_shards.SearchShards { + _searchshards := core_search_shards.NewSearchShardsFunc(p.tp) + return _searchshards() +} + +// Run a search with a search template. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-template +func (p *MethodAPI) SearchTemplate() *core_search_template.SearchTemplate { + _searchtemplate := core_search_template.NewSearchTemplateFunc(p.tp) + return _searchtemplate() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-terms-enum +func (p *MethodAPI) TermsEnum(index string) *core_terms_enum.TermsEnum { + _termsenum := core_terms_enum.NewTermsEnumFunc(p.tp) + return _termsenum(index) +} + +// 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. +// Refer to the linked documentation for detailed examples of how to use this +// API. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-termvectors +func (p *MethodAPI) Termvectors(index string) *core_termvectors.Termvectors { + _termvectors := core_termvectors.NewTermvectorsFunc(p.tp) + return _termvectors(index) +} + +// 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). +// For usage examples such as partial updates, upserts, and scripted updates, +// see the External documentation. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update +func (p *MethodAPI) Update(index, id string) *core_update.Update { + _update := core_update.NewUpdateFunc(p.tp) + return _update(index, id) +} + +// 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. +// +// **Refreshing shards** +// +// Specifying the `refresh` parameter refreshes all shards once the request +// completes. +// This is different to the update API's `refresh` parameter, which causes only +// the shard +// that received the request to be refreshed. Unlike the update API, it does not +// support +// `wait_for`. +// +// **Running update by query asynchronously** +// +// If the request contains `wait_for_completion=false`, Elasticsearch +// performs some preflight checks, launches the request, and returns a +// [task](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks) +// you can use to cancel or get the status of the task. +// Elasticsearch creates a record of this task as a document at +// `.tasks/task/${taskId}`. +// +// **Waiting for active shards** +// +// `wait_for_active_shards` controls how many copies of a shard must be active +// before proceeding with the request. See +// [`wait_for_active_shards`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards) +// for details. `timeout` controls how long each write request waits for +// unavailable +// shards to become available. Both work exactly the way they work in the +// [Bulk +// API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk). +// Update by query uses scrolled searches, so you can also +// specify the `scroll` parameter to control how long it keeps the search +// context +// alive, for example `?scroll=10m`. The default is 5 minutes. +// +// **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. +// Refer to the linked documentation for examples of how to update documents +// using the `_update_by_query` API: +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query +func (p *MethodAPI) UpdateByQuery(index string) *core_update_by_query.UpdateByQuery { + _updatebyquery := core_update_by_query.NewUpdateByQueryFunc(p.tp) + return _updatebyquery(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-update-by-query-rethrottle +func (p *MethodAPI) UpdateByQueryRethrottle(taskid string) *core_update_by_query_rethrottle.UpdateByQueryRethrottle { + _updatebyqueryrethrottle := core_update_by_query_rethrottle.NewUpdateByQueryRethrottleFunc(p.tp) + return _updatebyqueryrethrottle(taskid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-async-search-submit +func (p *MethodAsyncSearch) Delete(id string) *async_search_delete.Delete { + _delete := async_search_delete.NewDeleteFunc(p.tp) + return _delete(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-async-search-submit +func (p *MethodAsyncSearch) Get(id string) *async_search_get.Get { + _get := async_search_get.NewGetFunc(p.tp) + return _get(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-async-search-submit +func (p *MethodAsyncSearch) Status(id string) *async_search_status.Status { + _status := async_search_status.NewStatusFunc(p.tp) + return _status(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-async-search-submit +func (p *MethodAsyncSearch) Submit() *async_search_submit.Submit { + _submit := async_search_submit.NewSubmitFunc(p.tp) + return _submit() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-autoscaling-delete-autoscaling-policy +func (p *MethodAutoscaling) DeleteAutoscalingPolicy(name string) *autoscaling_delete_autoscaling_policy.DeleteAutoscalingPolicy { + _deleteautoscalingpolicy := autoscaling_delete_autoscaling_policy.NewDeleteAutoscalingPolicyFunc(p.tp) + return _deleteautoscalingpolicy(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-capacity +func (p *MethodAutoscaling) GetAutoscalingCapacity() *autoscaling_get_autoscaling_capacity.GetAutoscalingCapacity { + _getautoscalingcapacity := autoscaling_get_autoscaling_capacity.NewGetAutoscalingCapacityFunc(p.tp) + return _getautoscalingcapacity() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-autoscaling-get-autoscaling-capacity +func (p *MethodAutoscaling) GetAutoscalingPolicy(name string) *autoscaling_get_autoscaling_policy.GetAutoscalingPolicy { + _getautoscalingpolicy := autoscaling_get_autoscaling_policy.NewGetAutoscalingPolicyFunc(p.tp) + return _getautoscalingpolicy(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-autoscaling-put-autoscaling-policy +func (p *MethodAutoscaling) PutAutoscalingPolicy(name string) *autoscaling_put_autoscaling_policy.PutAutoscalingPolicy { + _putautoscalingpolicy := autoscaling_put_autoscaling_policy.NewPutAutoscalingPolicyFunc(p.tp) + return _putautoscalingpolicy(name) +} + +// 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 +func (p *MethodCapabilities) Capabilities() *capabilities.Capabilities { + _capabilities := capabilities.NewCapabilitiesFunc(p.tp) + return _capabilities() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-aliases +func (p *MethodCat) Aliases() *cat_aliases.Aliases { + _aliases := cat_aliases.NewAliasesFunc(p.tp) + return _aliases() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-allocation +func (p *MethodCat) Allocation() *cat_allocation.Allocation { + _allocation := cat_allocation.NewAllocationFunc(p.tp) + return _allocation() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-component-templates +func (p *MethodCat) ComponentTemplates() *cat_component_templates.ComponentTemplates { + _componenttemplates := cat_component_templates.NewComponentTemplatesFunc(p.tp) + return _componenttemplates() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-count +func (p *MethodCat) Count() *cat_count.Count { + _count := cat_count.NewCountFunc(p.tp) + return _count() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-fielddata +func (p *MethodCat) Fielddata() *cat_fielddata.Fielddata { + _fielddata := cat_fielddata.NewFielddataFunc(p.tp) + return _fielddata() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-health +func (p *MethodCat) Health() *cat_health.Health { + _health := cat_health.NewHealthFunc(p.tp) + return _health() +} + +// Get CAT help. +// +// Get help for the CAT APIs. +// https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cat +func (p *MethodCat) Help() *cat_help.Help { + _help := cat_help.NewHelpFunc(p.tp) + return _help() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-indices +func (p *MethodCat) Indices() *cat_indices.Indices { + _indices := cat_indices.NewIndicesFunc(p.tp) + return _indices() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-master +func (p *MethodCat) Master() *cat_master.Master { + _master := cat_master.NewMasterFunc(p.tp) + return _master() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-ml-data-frame-analytics +func (p *MethodCat) MlDataFrameAnalytics() *cat_ml_data_frame_analytics.MlDataFrameAnalytics { + _mldataframeanalytics := cat_ml_data_frame_analytics.NewMlDataFrameAnalyticsFunc(p.tp) + return _mldataframeanalytics() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-ml-datafeeds +func (p *MethodCat) MlDatafeeds() *cat_ml_datafeeds.MlDatafeeds { + _mldatafeeds := cat_ml_datafeeds.NewMlDatafeedsFunc(p.tp) + return _mldatafeeds() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-ml-jobs +func (p *MethodCat) MlJobs() *cat_ml_jobs.MlJobs { + _mljobs := cat_ml_jobs.NewMlJobsFunc(p.tp) + return _mljobs() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-ml-trained-models +func (p *MethodCat) MlTrainedModels() *cat_ml_trained_models.MlTrainedModels { + _mltrainedmodels := cat_ml_trained_models.NewMlTrainedModelsFunc(p.tp) + return _mltrainedmodels() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-nodeattrs +func (p *MethodCat) Nodeattrs() *cat_nodeattrs.Nodeattrs { + _nodeattrs := cat_nodeattrs.NewNodeattrsFunc(p.tp) + return _nodeattrs() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-nodes +func (p *MethodCat) Nodes() *cat_nodes.Nodes { + _nodes := cat_nodes.NewNodesFunc(p.tp) + return _nodes() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-pending-tasks +func (p *MethodCat) PendingTasks() *cat_pending_tasks.PendingTasks { + _pendingtasks := cat_pending_tasks.NewPendingTasksFunc(p.tp) + return _pendingtasks() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-plugins +func (p *MethodCat) Plugins() *cat_plugins.Plugins { + _plugins := cat_plugins.NewPluginsFunc(p.tp) + return _plugins() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-recovery +func (p *MethodCat) Recovery() *cat_recovery.Recovery { + _recovery := cat_recovery.NewRecoveryFunc(p.tp) + return _recovery() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-repositories +func (p *MethodCat) Repositories() *cat_repositories.Repositories { + _repositories := cat_repositories.NewRepositoriesFunc(p.tp) + return _repositories() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-segments +func (p *MethodCat) Segments() *cat_segments.Segments { + _segments := cat_segments.NewSegmentsFunc(p.tp) + return _segments() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-shards +func (p *MethodCat) Shards() *cat_shards.Shards { + _shards := cat_shards.NewShardsFunc(p.tp) + return _shards() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-snapshots +func (p *MethodCat) Snapshots() *cat_snapshots.Snapshots { + _snapshots := cat_snapshots.NewSnapshotsFunc(p.tp) + return _snapshots() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-tasks +func (p *MethodCat) Tasks() *cat_tasks.Tasks { + _tasks := cat_tasks.NewTasksFunc(p.tp) + return _tasks() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-templates +func (p *MethodCat) Templates() *cat_templates.Templates { + _templates := cat_templates.NewTemplatesFunc(p.tp) + return _templates() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-thread-pool +func (p *MethodCat) ThreadPool() *cat_thread_pool.ThreadPool { + _threadpool := cat_thread_pool.NewThreadPoolFunc(p.tp) + return _threadpool() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cat-transforms +func (p *MethodCat) Transforms() *cat_transforms.Transforms { + _transforms := cat_transforms.NewTransformsFunc(p.tp) + return _transforms() +} + +// Delete auto-follow patterns. +// +// Delete a collection of cross-cluster replication auto-follow patterns. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-delete-auto-follow-pattern +func (p *MethodCcr) DeleteAutoFollowPattern(name string) *ccr_delete_auto_follow_pattern.DeleteAutoFollowPattern { + _deleteautofollowpattern := ccr_delete_auto_follow_pattern.NewDeleteAutoFollowPatternFunc(p.tp) + return _deleteautofollowpattern(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ccr-follow +func (p *MethodCcr) Follow(index string) *ccr_follow.Follow { + _follow := ccr_follow.NewFollowFunc(p.tp) + return _follow(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ccr-follow-info +func (p *MethodCcr) FollowInfo(index string) *ccr_follow_info.FollowInfo { + _followinfo := ccr_follow_info.NewFollowInfoFunc(p.tp) + return _followinfo(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ccr-follow-stats +func (p *MethodCcr) FollowStats(index string) *ccr_follow_stats.FollowStats { + _followstats := ccr_follow_stats.NewFollowStatsFunc(p.tp) + return _followstats(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ccr-forget-follower +func (p *MethodCcr) ForgetFollower(index string) *ccr_forget_follower.ForgetFollower { + _forgetfollower := ccr_forget_follower.NewForgetFollowerFunc(p.tp) + return _forgetfollower(index) +} + +// Get auto-follow patterns. +// +// Get cross-cluster replication auto-follow patterns. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ccr-get-auto-follow-pattern-1 +func (p *MethodCcr) GetAutoFollowPattern() *ccr_get_auto_follow_pattern.GetAutoFollowPattern { + _getautofollowpattern := ccr_get_auto_follow_pattern.NewGetAutoFollowPatternFunc(p.tp) + return _getautofollowpattern() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ccr-pause-auto-follow-pattern +func (p *MethodCcr) PauseAutoFollowPattern(name string) *ccr_pause_auto_follow_pattern.PauseAutoFollowPattern { + _pauseautofollowpattern := ccr_pause_auto_follow_pattern.NewPauseAutoFollowPatternFunc(p.tp) + return _pauseautofollowpattern(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ccr-pause-follow +func (p *MethodCcr) PauseFollow(index string) *ccr_pause_follow.PauseFollow { + _pausefollow := ccr_pause_follow.NewPauseFollowFunc(p.tp) + return _pausefollow(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ccr-put-auto-follow-pattern +func (p *MethodCcr) PutAutoFollowPattern(name string) *ccr_put_auto_follow_pattern.PutAutoFollowPattern { + _putautofollowpattern := ccr_put_auto_follow_pattern.NewPutAutoFollowPatternFunc(p.tp) + return _putautofollowpattern(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ccr-resume-auto-follow-pattern +func (p *MethodCcr) ResumeAutoFollowPattern(name string) *ccr_resume_auto_follow_pattern.ResumeAutoFollowPattern { + _resumeautofollowpattern := ccr_resume_auto_follow_pattern.NewResumeAutoFollowPatternFunc(p.tp) + return _resumeautofollowpattern(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ccr-resume-follow +func (p *MethodCcr) ResumeFollow(index string) *ccr_resume_follow.ResumeFollow { + _resumefollow := ccr_resume_follow.NewResumeFollowFunc(p.tp) + return _resumefollow(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ccr-stats +func (p *MethodCcr) Stats() *ccr_stats.Stats { + _stats := ccr_stats.NewStatsFunc(p.tp) + return _stats() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ccr-unfollow +func (p *MethodCcr) Unfollow(index string) *ccr_unfollow.Unfollow { + _unfollow := ccr_unfollow.NewUnfollowFunc(p.tp) + return _unfollow(index) +} + +// 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. +// Refer to the linked documentation for examples of how to troubleshoot +// allocation issues using this API. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain +func (p *MethodCluster) AllocationExplain() *cluster_allocation_explain.AllocationExplain { + _allocationexplain := cluster_allocation_explain.NewAllocationExplainFunc(p.tp) + return _allocationexplain() +} + +// Delete component templates. +// Component templates are building blocks for constructing index templates that +// specify index mappings, settings, and aliases. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template +func (p *MethodCluster) DeleteComponentTemplate(name string) *cluster_delete_component_template.DeleteComponentTemplate { + _deletecomponenttemplate := cluster_delete_component_template.NewDeleteComponentTemplateFunc(p.tp) + return _deletecomponenttemplate(name) +} + +// Clear cluster voting config exclusions. +// Remove master-eligible nodes from the voting configuration exclusion list. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-post-voting-config-exclusions +func (p *MethodCluster) DeleteVotingConfigExclusions() *cluster_delete_voting_config_exclusions.DeleteVotingConfigExclusions { + _deletevotingconfigexclusions := cluster_delete_voting_config_exclusions.NewDeleteVotingConfigExclusionsFunc(p.tp) + return _deletevotingconfigexclusions() +} + +// Check component templates. +// Returns information about whether a particular component template exists. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template +func (p *MethodCluster) ExistsComponentTemplate(name string) *cluster_exists_component_template.ExistsComponentTemplate { + _existscomponenttemplate := cluster_exists_component_template.NewExistsComponentTemplateFunc(p.tp) + return _existscomponenttemplate(name) +} + +// Get component templates. +// Get information about component templates. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template +func (p *MethodCluster) GetComponentTemplate() *cluster_get_component_template.GetComponentTemplate { + _getcomponenttemplate := cluster_get_component_template.NewGetComponentTemplateFunc(p.tp) + return _getcomponenttemplate() +} + +// Get cluster-wide settings. +// +// By default, it returns only settings that have been explicitly defined. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-get-settings +func (p *MethodCluster) GetSettings() *cluster_get_settings.GetSettings { + _getsettings := cluster_get_settings.NewGetSettingsFunc(p.tp) + return _getsettings() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cluster-health +func (p *MethodCluster) Health() *cluster_health.Health { + _health := cluster_health.NewHealthFunc(p.tp) + return _health() +} + +// Get cluster info. +// Returns basic information about the cluster. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-info +func (p *MethodCluster) Info(target string) *cluster_info.Info { + _info := cluster_info.NewInfoFunc(p.tp) + return _info(target) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cluster-pending-tasks +func (p *MethodCluster) PendingTasks() *cluster_pending_tasks.PendingTasks { + _pendingtasks := cluster_pending_tasks.NewPendingTasksFunc(p.tp) + return _pendingtasks() +} + +// 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/operation/operation-cluster-post-voting-config-exclusions +func (p *MethodCluster) PostVotingConfigExclusions() *cluster_post_voting_config_exclusions.PostVotingConfigExclusions { + _postvotingconfigexclusions := cluster_post_voting_config_exclusions.NewPostVotingConfigExclusionsFunc(p.tp) + return _postvotingconfigexclusions() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cluster-put-component-template +func (p *MethodCluster) PutComponentTemplate(name string) *cluster_put_component_template.PutComponentTemplate { + _putcomponenttemplate := cluster_put_component_template.NewPutComponentTemplateFunc(p.tp) + return _putcomponenttemplate(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cluster-put-settings +func (p *MethodCluster) PutSettings() *cluster_put_settings.PutSettings { + _putsettings := cluster_put_settings.NewPutSettingsFunc(p.tp) + return _putsettings() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cluster-remote-info +func (p *MethodCluster) RemoteInfo() *cluster_remote_info.RemoteInfo { + _remoteinfo := cluster_remote_info.NewRemoteInfoFunc(p.tp) + return _remoteinfo() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cluster-reroute +func (p *MethodCluster) Reroute() *cluster_reroute.Reroute { + _reroute := cluster_reroute.NewRerouteFunc(p.tp) + return _reroute() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cluster-state +func (p *MethodCluster) State() *cluster_state.State { + _state := cluster_state.NewStateFunc(p.tp) + return _state() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-cluster-stats +func (p *MethodCluster) Stats() *cluster_stats.Stats { + _stats := cluster_stats.NewStatsFunc(p.tp) + return _stats() +} + +// Check in a connector. +// +// Update the `last_seen` field in the connector and set it to the current +// timestamp. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-check-in +func (p *MethodConnector) CheckIn(connectorid string) *connector_check_in.CheckIn { + _checkin := connector_check_in.NewCheckInFunc(p.tp) + return _checkin(connectorid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-delete +func (p *MethodConnector) Delete(connectorid string) *connector_delete.Delete { + _delete := connector_delete.NewDeleteFunc(p.tp) + return _delete(connectorid) +} + +// Get a connector. +// +// Get the details about a connector. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-get +func (p *MethodConnector) Get(connectorid string) *connector_get.Get { + _get := connector_get.NewGetFunc(p.tp) + return _get(connectorid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-last-sync +func (p *MethodConnector) LastSync(connectorid string) *connector_last_sync.LastSync { + _lastsync := connector_last_sync.NewLastSyncFunc(p.tp) + return _lastsync(connectorid) +} + +// Get all connectors. +// +// Get information about all connectors. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-list +func (p *MethodConnector) List() *connector_list.List { + _list := connector_list.NewListFunc(p.tp) + return _list() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-put +func (p *MethodConnector) Post() *connector_post.Post { + _post := connector_post.NewPostFunc(p.tp) + return _post() +} + +// Create or update a connector. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-put +func (p *MethodConnector) Put() *connector_put.Put { + _put := connector_put.NewPutFunc(p.tp) + return _put() +} + +// Creates a secret for a Connector. +func (p *MethodConnector) SecretPost() *connector_secret_post.SecretPost { + _secretpost := connector_secret_post.NewSecretPostFunc(p.tp) + return _secretpost() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-cancel +func (p *MethodConnector) SyncJobCancel(connectorsyncjobid string) *connector_sync_job_cancel.SyncJobCancel { + _syncjobcancel := connector_sync_job_cancel.NewSyncJobCancelFunc(p.tp) + return _syncjobcancel(connectorsyncjobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-check-in +func (p *MethodConnector) SyncJobCheckIn(connectorsyncjobid string) *connector_sync_job_check_in.SyncJobCheckIn { + _syncjobcheckin := connector_sync_job_check_in.NewSyncJobCheckInFunc(p.tp) + return _syncjobcheckin(connectorsyncjobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-claim +func (p *MethodConnector) SyncJobClaim(connectorsyncjobid string) *connector_sync_job_claim.SyncJobClaim { + _syncjobclaim := connector_sync_job_claim.NewSyncJobClaimFunc(p.tp) + return _syncjobclaim(connectorsyncjobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-delete +func (p *MethodConnector) SyncJobDelete(connectorsyncjobid string) *connector_sync_job_delete.SyncJobDelete { + _syncjobdelete := connector_sync_job_delete.NewSyncJobDeleteFunc(p.tp) + return _syncjobdelete(connectorsyncjobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-error +func (p *MethodConnector) SyncJobError(connectorsyncjobid string) *connector_sync_job_error.SyncJobError { + _syncjoberror := connector_sync_job_error.NewSyncJobErrorFunc(p.tp) + return _syncjoberror(connectorsyncjobid) +} + +// Get a connector sync job. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-get +func (p *MethodConnector) SyncJobGet(connectorsyncjobid string) *connector_sync_job_get.SyncJobGet { + _syncjobget := connector_sync_job_get.NewSyncJobGetFunc(p.tp) + return _syncjobget(connectorsyncjobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-list +func (p *MethodConnector) SyncJobList() *connector_sync_job_list.SyncJobList { + _syncjoblist := connector_sync_job_list.NewSyncJobListFunc(p.tp) + return _syncjoblist() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-post +func (p *MethodConnector) SyncJobPost() *connector_sync_job_post.SyncJobPost { + _syncjobpost := connector_sync_job_post.NewSyncJobPostFunc(p.tp) + return _syncjobpost() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-sync-job-update-stats +func (p *MethodConnector) SyncJobUpdateStats(connectorsyncjobid string) *connector_sync_job_update_stats.SyncJobUpdateStats { + _syncjobupdatestats := connector_sync_job_update_stats.NewSyncJobUpdateStatsFunc(p.tp) + return _syncjobupdatestats(connectorsyncjobid) +} + +// Activate the connector draft filter. +// +// Activates the valid draft filtering for a connector. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering +func (p *MethodConnector) UpdateActiveFiltering(connectorid string) *connector_update_active_filtering.UpdateActiveFiltering { + _updateactivefiltering := connector_update_active_filtering.NewUpdateActiveFilteringFunc(p.tp) + return _updateactivefiltering(connectorid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-update-api-key-id +func (p *MethodConnector) UpdateApiKeyId(connectorid string) *connector_update_api_key_id.UpdateApiKeyId { + _updateapikeyid := connector_update_api_key_id.NewUpdateApiKeyIdFunc(p.tp) + return _updateapikeyid(connectorid) +} + +// Update the connector configuration. +// +// Update the configuration field in the connector document. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-configuration +func (p *MethodConnector) UpdateConfiguration(connectorid string) *connector_update_configuration.UpdateConfiguration { + _updateconfiguration := connector_update_configuration.NewUpdateConfigurationFunc(p.tp) + return _updateconfiguration(connectorid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-update-error +func (p *MethodConnector) UpdateError(connectorid string) *connector_update_error.UpdateError { + _updateerror := connector_update_error.NewUpdateErrorFunc(p.tp) + return _updateerror(connectorid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-update-features +func (p *MethodConnector) UpdateFeatures(connectorid string) *connector_update_features.UpdateFeatures { + _updatefeatures := connector_update_features.NewUpdateFeaturesFunc(p.tp) + return _updatefeatures(connectorid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering +func (p *MethodConnector) UpdateFiltering(connectorid string) *connector_update_filtering.UpdateFiltering { + _updatefiltering := connector_update_filtering.NewUpdateFilteringFunc(p.tp) + return _updatefiltering(connectorid) +} + +// Update the connector draft filtering validation. +// +// Update the draft filtering validation info for a connector. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-filtering-validation +func (p *MethodConnector) UpdateFilteringValidation(connectorid string) *connector_update_filtering_validation.UpdateFilteringValidation { + _updatefilteringvalidation := connector_update_filtering_validation.NewUpdateFilteringValidationFunc(p.tp) + return _updatefilteringvalidation(connectorid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-update-index-name +func (p *MethodConnector) UpdateIndexName(connectorid string) *connector_update_index_name.UpdateIndexName { + _updateindexname := connector_update_index_name.NewUpdateIndexNameFunc(p.tp) + return _updateindexname(connectorid) +} + +// Update the connector name and description. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-name +func (p *MethodConnector) UpdateName(connectorid string) *connector_update_name.UpdateName { + _updatename := connector_update_name.NewUpdateNameFunc(p.tp) + return _updatename(connectorid) +} + +// Update the connector is_native flag. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-native +func (p *MethodConnector) UpdateNative(connectorid string) *connector_update_native.UpdateNative { + _updatenative := connector_update_native.NewUpdateNativeFunc(p.tp) + return _updatenative(connectorid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-connector-update-pipeline +func (p *MethodConnector) UpdatePipeline(connectorid string) *connector_update_pipeline.UpdatePipeline { + _updatepipeline := connector_update_pipeline.NewUpdatePipelineFunc(p.tp) + return _updatepipeline(connectorid) +} + +// Update the connector scheduling. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-scheduling +func (p *MethodConnector) UpdateScheduling(connectorid string) *connector_update_scheduling.UpdateScheduling { + _updatescheduling := connector_update_scheduling.NewUpdateSchedulingFunc(p.tp) + return _updatescheduling(connectorid) +} + +// Update the connector service type. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-service-type +func (p *MethodConnector) UpdateServiceType(connectorid string) *connector_update_service_type.UpdateServiceType { + _updateservicetype := connector_update_service_type.NewUpdateServiceTypeFunc(p.tp) + return _updateservicetype(connectorid) +} + +// Update the connector status. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-connector-update-status +func (p *MethodConnector) UpdateStatus(connectorid string) *connector_update_status.UpdateStatus { + _updatestatus := connector_update_status.NewUpdateStatusFunc(p.tp) + return _updatestatus(connectorid) +} + +// 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. +// +// You might want to disable the refresh interval temporarily to improve +// indexing throughput for large bulk requests. +// Refer to the linked documentation for step-by-step instructions using the +// index settings API. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk +func (p *MethodCore) Bulk() *core_bulk.Bulk { + _bulk := core_bulk.NewBulkFunc(p.tp) + return _bulk() +} + +// Clear a scrolling search. +// Clear the search context and results for a scrolling search. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-clear-scroll +func (p *MethodCore) ClearScroll() *core_clear_scroll.ClearScroll { + _clearscroll := core_clear_scroll.NewClearScrollFunc(p.tp) + return _clearscroll() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-open-point-in-time +func (p *MethodCore) ClosePointInTime() *core_close_point_in_time.ClosePointInTime { + _closepointintime := core_close_point_in_time.NewClosePointInTimeFunc(p.tp) + return _closepointintime() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-count +func (p *MethodCore) Count() *core_count.Count { + _count := core_count.NewCountFunc(p.tp) + return _count() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-create +func (p *MethodCore) Create(index, id string) *core_create.Create { + _create := core_create.NewCreateFunc(p.tp) + return _create(index, id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-delete +func (p *MethodCore) Delete(index, id string) *core_delete.Delete { + _delete := core_delete.NewDeleteFunc(p.tp) + return _delete(index, id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-delete-by-query +func (p *MethodCore) DeleteByQuery(index string) *core_delete_by_query.DeleteByQuery { + _deletebyquery := core_delete_by_query.NewDeleteByQueryFunc(p.tp) + return _deletebyquery(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-delete-by-query-rethrottle +func (p *MethodCore) DeleteByQueryRethrottle(taskid string) *core_delete_by_query_rethrottle.DeleteByQueryRethrottle { + _deletebyqueryrethrottle := core_delete_by_query_rethrottle.NewDeleteByQueryRethrottleFunc(p.tp) + return _deletebyqueryrethrottle(taskid) +} + +// Delete a script or search template. +// Deletes a stored script or search template. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-delete-script +func (p *MethodCore) DeleteScript(id string) *core_delete_script.DeleteScript { + _deletescript := core_delete_script.NewDeleteScriptFunc(p.tp) + return _deletescript(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-get +func (p *MethodCore) Exists(index, id string) *core_exists.Exists { + _exists := core_exists.NewExistsFunc(p.tp) + return _exists(index, id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-get +func (p *MethodCore) ExistsSource(index, id string) *core_exists_source.ExistsSource { + _existssource := core_exists_source.NewExistsSourceFunc(p.tp) + return _existssource(index, id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-explain +func (p *MethodCore) Explain(index, id string) *core_explain.Explain { + _explain := core_explain.NewExplainFunc(p.tp) + return _explain(index, id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-field-caps +func (p *MethodCore) FieldCaps() *core_field_caps.FieldCaps { + _fieldcaps := core_field_caps.NewFieldCapsFunc(p.tp) + return _fieldcaps() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-get +func (p *MethodCore) Get(index, id string) *core_get.Get { + _get := core_get.NewGetFunc(p.tp) + return _get(index, id) +} + +// Get a script or search template. +// Retrieves a stored script or search template. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script +func (p *MethodCore) GetScript(id string) *core_get_script.GetScript { + _getscript := core_get_script.NewGetScriptFunc(p.tp) + return _getscript(id) +} + +// Get script contexts. +// +// Get a list of supported script contexts and their methods. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-context +func (p *MethodCore) GetScriptContext() *core_get_script_context.GetScriptContext { + _getscriptcontext := core_get_script_context.NewGetScriptContextFunc(p.tp) + return _getscriptcontext() +} + +// Get script languages. +// +// Get a list of available script types, languages, and contexts. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-get-script-languages +func (p *MethodCore) GetScriptLanguages() *core_get_script_languages.GetScriptLanguages { + _getscriptlanguages := core_get_script_languages.NewGetScriptLanguagesFunc(p.tp) + return _getscriptlanguages() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-get +func (p *MethodCore) GetSource(index, id string) *core_get_source.GetSource { + _getsource := core_get_source.NewGetSourceFunc(p.tp) + return _getsource(index, id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-health-report +func (p *MethodCore) HealthReport() *core_health_report.HealthReport { + _healthreport := core_health_report.NewHealthReportFunc(p.tp) + return _healthreport() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-create +func (p *MethodCore) Index(index string) *core_index.Index { + _index := core_index.NewIndexFunc(p.tp) + return _index(index) +} + +// 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/docs/api/doc/elasticsearch/group/endpoint-info +func (p *MethodCore) Info() *core_info.Info { + _info := core_info.NewInfoFunc(p.tp) + return _info() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-mget +func (p *MethodCore) Mget() *core_mget.Mget { + _mget := core_mget.NewMgetFunc(p.tp) + return _mget() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-msearch +func (p *MethodCore) Msearch() *core_msearch.Msearch { + _msearch := core_msearch.NewMsearchFunc(p.tp) + return _msearch() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-msearch-template +func (p *MethodCore) MsearchTemplate() *core_msearch_template.MsearchTemplate { + _msearchtemplate := core_msearch_template.NewMsearchTemplateFunc(p.tp) + return _msearchtemplate() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-mtermvectors +func (p *MethodCore) Mtermvectors() *core_mtermvectors.Mtermvectors { + _mtermvectors := core_mtermvectors.NewMtermvectorsFunc(p.tp) + return _mtermvectors() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-open-point-in-time +func (p *MethodCore) OpenPointInTime(index string) *core_open_point_in_time.OpenPointInTime { + _openpointintime := core_open_point_in_time.NewOpenPointInTimeFunc(p.tp) + return _openpointintime(index) +} + +// Ping the cluster. +// Get information about whether the cluster is running. +// https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-cluster +func (p *MethodCore) Ping() *core_ping.Ping { + _ping := core_ping.NewPingFunc(p.tp) + return _ping() +} + +// Create or update a script or search template. +// Creates or updates a stored script or search template. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-put-script +func (p *MethodCore) PutScript(id string) *core_put_script.PutScript { + _putscript := core_put_script.NewPutScriptFunc(p.tp) + return _putscript(id) +} + +// Evaluate ranked search results. +// +// Evaluate the quality of ranked search results over a set of typical search +// queries. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rank-eval +func (p *MethodCore) RankEval() *core_rank_eval.RankEval { + _rankeval := core_rank_eval.NewRankEvalFunc(p.tp) + return _rankeval() +} + +// 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. +// +// Refer to the linked documentation for examples of how to reindex documents. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex +func (p *MethodCore) Reindex() *core_reindex.Reindex { + _reindex := core_reindex.NewReindexFunc(p.tp) + return _reindex() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-reindex +func (p *MethodCore) ReindexRethrottle(taskid string) *core_reindex_rethrottle.ReindexRethrottle { + _reindexrethrottle := core_reindex_rethrottle.NewReindexRethrottleFunc(p.tp) + return _reindexrethrottle(taskid) +} + +// Render a search template. +// +// Render a search template as a search request body. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-render-search-template +func (p *MethodCore) RenderSearchTemplate() *core_render_search_template.RenderSearchTemplate { + _rendersearchtemplate := core_render_search_template.NewRenderSearchTemplateFunc(p.tp) + return _rendersearchtemplate() +} + +// 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/docs/reference/scripting-languages/painless/painless-api-examples +func (p *MethodCore) ScriptsPainlessExecute() *core_scripts_painless_execute.ScriptsPainlessExecute { + _scriptspainlessexecute := core_scripts_painless_execute.NewScriptsPainlessExecuteFunc(p.tp) + return _scriptspainlessexecute() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-scroll +func (p *MethodCore) Scroll() *core_scroll.Scroll { + _scroll := core_scroll.NewScrollFunc(p.tp) + return _scroll() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-search +func (p *MethodCore) Search() *core_search.Search { + _search := core_search.NewSearchFunc(p.tp) + return _search() +} + +// 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. +// +// 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. +// +// Learn how to use the vector tile search API with practical examples in the +// [Vector tile search +// examples](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/vector-tile-search) +// guide. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-mvt +func (p *MethodCore) SearchMvt(index, field, zoom, x, y string) *core_search_mvt.SearchMvt { + _searchmvt := core_search_mvt.NewSearchMvtFunc(p.tp) + return _searchmvt(index, field, zoom, x, y) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-search-shards +func (p *MethodCore) SearchShards() *core_search_shards.SearchShards { + _searchshards := core_search_shards.NewSearchShardsFunc(p.tp) + return _searchshards() +} + +// Run a search with a search template. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-template +func (p *MethodCore) SearchTemplate() *core_search_template.SearchTemplate { + _searchtemplate := core_search_template.NewSearchTemplateFunc(p.tp) + return _searchtemplate() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-terms-enum +func (p *MethodCore) TermsEnum(index string) *core_terms_enum.TermsEnum { + _termsenum := core_terms_enum.NewTermsEnumFunc(p.tp) + return _termsenum(index) +} + +// 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. +// Refer to the linked documentation for detailed examples of how to use this +// API. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-termvectors +func (p *MethodCore) Termvectors(index string) *core_termvectors.Termvectors { + _termvectors := core_termvectors.NewTermvectorsFunc(p.tp) + return _termvectors(index) +} + +// 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). +// For usage examples such as partial updates, upserts, and scripted updates, +// see the External documentation. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update +func (p *MethodCore) Update(index, id string) *core_update.Update { + _update := core_update.NewUpdateFunc(p.tp) + return _update(index, id) +} + +// 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. +// +// **Refreshing shards** +// +// Specifying the `refresh` parameter refreshes all shards once the request +// completes. +// This is different to the update API's `refresh` parameter, which causes only +// the shard +// that received the request to be refreshed. Unlike the update API, it does not +// support +// `wait_for`. +// +// **Running update by query asynchronously** +// +// If the request contains `wait_for_completion=false`, Elasticsearch +// performs some preflight checks, launches the request, and returns a +// [task](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks) +// you can use to cancel or get the status of the task. +// Elasticsearch creates a record of this task as a document at +// `.tasks/task/${taskId}`. +// +// **Waiting for active shards** +// +// `wait_for_active_shards` controls how many copies of a shard must be active +// before proceeding with the request. See +// [`wait_for_active_shards`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards) +// for details. `timeout` controls how long each write request waits for +// unavailable +// shards to become available. Both work exactly the way they work in the +// [Bulk +// API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk). +// Update by query uses scrolled searches, so you can also +// specify the `scroll` parameter to control how long it keeps the search +// context +// alive, for example `?scroll=10m`. The default is 5 minutes. +// +// **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. +// Refer to the linked documentation for examples of how to update documents +// using the `_update_by_query` API: +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query +func (p *MethodCore) UpdateByQuery(index string) *core_update_by_query.UpdateByQuery { + _updatebyquery := core_update_by_query.NewUpdateByQueryFunc(p.tp) + return _updatebyquery(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-update-by-query-rethrottle +func (p *MethodCore) UpdateByQueryRethrottle(taskid string) *core_update_by_query_rethrottle.UpdateByQueryRethrottle { + _updatebyqueryrethrottle := core_update_by_query_rethrottle.NewUpdateByQueryRethrottleFunc(p.tp) + return _updatebyqueryrethrottle(taskid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-dangling-indices-delete-dangling-index +func (p *MethodDanglingIndices) DeleteDanglingIndex(indexuuid string) *dangling_indices_delete_dangling_index.DeleteDanglingIndex { + _deletedanglingindex := dangling_indices_delete_dangling_index.NewDeleteDanglingIndexFunc(p.tp) + return _deletedanglingindex(indexuuid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-dangling-indices-import-dangling-index +func (p *MethodDanglingIndices) ImportDanglingIndex(indexuuid string) *dangling_indices_import_dangling_index.ImportDanglingIndex { + _importdanglingindex := dangling_indices_import_dangling_index.NewImportDanglingIndexFunc(p.tp) + return _importdanglingindex(indexuuid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-dangling-indices-list-dangling-indices +func (p *MethodDanglingIndices) ListDanglingIndices() *dangling_indices_list_dangling_indices.ListDanglingIndices { + _listdanglingindices := dangling_indices_list_dangling_indices.NewListDanglingIndicesFunc(p.tp) + return _listdanglingindices() +} + +// Delete an enrich policy. +// Deletes an existing enrich policy and its enrich index. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-delete-policy +func (p *MethodEnrich) DeletePolicy(name string) *enrich_delete_policy.DeletePolicy { + _deletepolicy := enrich_delete_policy.NewDeletePolicyFunc(p.tp) + return _deletepolicy(name) +} + +// Run an enrich policy. +// Create the enrich index for an existing enrich policy. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-execute-policy +func (p *MethodEnrich) ExecutePolicy(name string) *enrich_execute_policy.ExecutePolicy { + _executepolicy := enrich_execute_policy.NewExecutePolicyFunc(p.tp) + return _executepolicy(name) +} + +// Get an enrich policy. +// Returns information about an enrich policy. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-get-policy +func (p *MethodEnrich) GetPolicy() *enrich_get_policy.GetPolicy { + _getpolicy := enrich_get_policy.NewGetPolicyFunc(p.tp) + return _getpolicy() +} + +// Create an enrich policy. +// Creates an enrich policy. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-put-policy +func (p *MethodEnrich) PutPolicy(name string) *enrich_put_policy.PutPolicy { + _putpolicy := enrich_put_policy.NewPutPolicyFunc(p.tp) + return _putpolicy(name) +} + +// Get enrich stats. +// Returns enrich coordinator statistics and information about enrich policies +// that are currently executing. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-enrich-stats +func (p *MethodEnrich) Stats() *enrich_stats.Stats { + _stats := enrich_stats.NewStatsFunc(p.tp) + return _stats() +} + +// 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/operation/operation-eql-delete +func (p *MethodEql) Delete(id string) *eql_delete.Delete { + _delete := eql_delete.NewDeleteFunc(p.tp) + return _delete(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-eql-get +func (p *MethodEql) Get(id string) *eql_get.Get { + _get := eql_get.NewGetFunc(p.tp) + return _get(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-eql-get-status +func (p *MethodEql) GetStatus(id string) *eql_get_status.GetStatus { + _getstatus := eql_get_status.NewGetStatusFunc(p.tp) + return _getstatus(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-eql-search +func (p *MethodEql) Search(index string) *eql_search.Search { + _search := eql_search.NewSearchFunc(p.tp) + return _search(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-esql-async-query +func (p *MethodEsql) AsyncQuery() *esql_async_query.AsyncQuery { + _asyncquery := esql_async_query.NewAsyncQueryFunc(p.tp) + return _asyncquery() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-esql-async-query-delete +func (p *MethodEsql) AsyncQueryDelete(id string) *esql_async_query_delete.AsyncQueryDelete { + _asyncquerydelete := esql_async_query_delete.NewAsyncQueryDeleteFunc(p.tp) + return _asyncquerydelete(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-esql-async-query-get +func (p *MethodEsql) AsyncQueryGet(id string) *esql_async_query_get.AsyncQueryGet { + _asyncqueryget := esql_async_query_get.NewAsyncQueryGetFunc(p.tp) + return _asyncqueryget(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-esql-async-query-stop +func (p *MethodEsql) AsyncQueryStop(id string) *esql_async_query_stop.AsyncQueryStop { + _asyncquerystop := esql_async_query_stop.NewAsyncQueryStopFunc(p.tp) + return _asyncquerystop(id) +} + +// Get a specific running ES|QL query information. +// Returns an object extended information about a running ES|QL query. +func (p *MethodEsql) GetQuery(id string) *esql_get_query.GetQuery { + _getquery := esql_get_query.NewGetQueryFunc(p.tp) + return _getquery(id) +} + +// Get running ES|QL queries information. +// Returns an object containing IDs and other information about the running +// ES|QL queries. +func (p *MethodEsql) ListQueries() *esql_list_queries.ListQueries { + _listqueries := esql_list_queries.NewListQueriesFunc(p.tp) + return _listqueries() +} + +// Run an ES|QL query. +// Get search results for an ES|QL (Elasticsearch query language) query. +// https://www.elastic.co/docs/explore-analyze/query-filter/languages/esql-rest +func (p *MethodEsql) Query() *esql_query.Query { + _query := esql_query.NewQueryFunc(p.tp) + return _query() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-features-get-features +func (p *MethodFeatures) GetFeatures() *features_get_features.GetFeatures { + _getfeatures := features_get_features.NewGetFeaturesFunc(p.tp) + return _getfeatures() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-features-reset-features +func (p *MethodFeatures) ResetFeatures() *features_reset_features.ResetFeatures { + _resetfeatures := features_reset_features.NewResetFeaturesFunc(p.tp) + return _resetfeatures() +} + +// 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/docs/api/doc/elasticsearch/group/endpoint-fleet +func (p *MethodFleet) GlobalCheckpoints(index string) *fleet_global_checkpoints.GlobalCheckpoints { + _globalcheckpoints := fleet_global_checkpoints.NewGlobalCheckpointsFunc(p.tp) + return _globalcheckpoints(index) +} + +// Run multiple Fleet searches. +// Run several Fleet searches with a single API request. +// The API follows the same structure as the multi search API. +// However, similar to the Fleet search API, it supports the +// `wait_for_checkpoints` parameter. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-fleet-msearch +func (p *MethodFleet) Msearch() *fleet_msearch.Msearch { + _msearch := fleet_msearch.NewMsearchFunc(p.tp) + return _msearch() +} + +// Creates a secret stored by Fleet. +func (p *MethodFleet) PostSecret() *fleet_post_secret.PostSecret { + _postsecret := fleet_post_secret.NewPostSecretFunc(p.tp) + return _postsecret() +} + +// Run a Fleet search. +// The purpose of the Fleet search API is to provide an API where the search +// will be run only +// after the provided checkpoint has been processed and is visible for searches +// inside of Elasticsearch. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-fleet-search +func (p *MethodFleet) Search(index string) *fleet_search.Search { + _search := fleet_search.NewSearchFunc(p.tp) + return _search(index) +} + +// 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/docs/api/doc/elasticsearch/group/endpoint-graph +func (p *MethodGraph) Explore(index string) *graph_explore.Explore { + _explore := graph_explore.NewExploreFunc(p.tp) + return _explore(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ilm-delete-lifecycle +func (p *MethodIlm) DeleteLifecycle(policy string) *ilm_delete_lifecycle.DeleteLifecycle { + _deletelifecycle := ilm_delete_lifecycle.NewDeleteLifecycleFunc(p.tp) + return _deletelifecycle(policy) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ilm-explain-lifecycle +func (p *MethodIlm) ExplainLifecycle(index string) *ilm_explain_lifecycle.ExplainLifecycle { + _explainlifecycle := ilm_explain_lifecycle.NewExplainLifecycleFunc(p.tp) + return _explainlifecycle(index) +} + +// Get lifecycle policies. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-lifecycle +func (p *MethodIlm) GetLifecycle() *ilm_get_lifecycle.GetLifecycle { + _getlifecycle := ilm_get_lifecycle.NewGetLifecycleFunc(p.tp) + return _getlifecycle() +} + +// Get the ILM status. +// +// Get the current index lifecycle management status. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ilm-get-status +func (p *MethodIlm) GetStatus() *ilm_get_status.GetStatus { + _getstatus := ilm_get_status.NewGetStatusFunc(p.tp) + return _getstatus() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ilm-migrate-to-data-tiers +func (p *MethodIlm) MigrateToDataTiers() *ilm_migrate_to_data_tiers.MigrateToDataTiers { + _migratetodatatiers := ilm_migrate_to_data_tiers.NewMigrateToDataTiersFunc(p.tp) + return _migratetodatatiers() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ilm-move-to-step +func (p *MethodIlm) MoveToStep(index string) *ilm_move_to_step.MoveToStep { + _movetostep := ilm_move_to_step.NewMoveToStepFunc(p.tp) + return _movetostep(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ilm-put-lifecycle +func (p *MethodIlm) PutLifecycle(policy string) *ilm_put_lifecycle.PutLifecycle { + _putlifecycle := ilm_put_lifecycle.NewPutLifecycleFunc(p.tp) + return _putlifecycle(policy) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ilm-remove-policy +func (p *MethodIlm) RemovePolicy(index string) *ilm_remove_policy.RemovePolicy { + _removepolicy := ilm_remove_policy.NewRemovePolicyFunc(p.tp) + return _removepolicy(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ilm-retry +func (p *MethodIlm) Retry(index string) *ilm_retry.Retry { + _retry := ilm_retry.NewRetryFunc(p.tp) + return _retry(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ilm-start +func (p *MethodIlm) Start() *ilm_start.Start { + _start := ilm_start.NewStartFunc(p.tp) + return _start() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ilm-stop +func (p *MethodIlm) Stop() *ilm_stop.Stop { + _stop := ilm_stop.NewStopFunc(p.tp) + return _stop() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-add-block +func (p *MethodIndices) AddBlock(index, block string) *indices_add_block.AddBlock { + _addblock := indices_add_block.NewAddBlockFunc(p.tp) + return _addblock(index, block) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-analyze +func (p *MethodIndices) Analyze() *indices_analyze.Analyze { + _analyze := indices_analyze.NewAnalyzeFunc(p.tp) + return _analyze() +} + +// Cancel a migration reindex operation. +// +// Cancel a migration reindex attempt for a data stream or index. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-cancel-migrate-reindex +func (p *MethodIndices) CancelMigrateReindex(index string) *indices_cancel_migrate_reindex.CancelMigrateReindex { + _cancelmigratereindex := indices_cancel_migrate_reindex.NewCancelMigrateReindexFunc(p.tp) + return _cancelmigratereindex(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-clear-cache +func (p *MethodIndices) ClearCache() *indices_clear_cache.ClearCache { + _clearcache := indices_clear_cache.NewClearCacheFunc(p.tp) + return _clearcache() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-clone +func (p *MethodIndices) Clone(index, target string) *indices_clone.Clone { + _clone := indices_clone.NewCloneFunc(p.tp) + return _clone(index, target) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-close +func (p *MethodIndices) Close(index string) *indices_close.Close { + _close := indices_close.NewCloseFunc(p.tp) + return _close(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-create +func (p *MethodIndices) Create(index string) *indices_create.Create { + _create := indices_create.NewCreateFunc(p.tp) + return _create(index) +} + +// Create a data stream. +// +// You must have a matching index template with data stream enabled. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-create-data-stream +func (p *MethodIndices) CreateDataStream(name string) *indices_create_data_stream.CreateDataStream { + _createdatastream := indices_create_data_stream.NewCreateDataStreamFunc(p.tp) + return _createdatastream(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-create-from +func (p *MethodIndices) CreateFrom(source, dest string) *indices_create_from.CreateFrom { + _createfrom := indices_create_from.NewCreateFromFunc(p.tp) + return _createfrom(source, dest) +} + +// Get data stream stats. +// +// Get statistics for one or more data streams. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-data-streams-stats-1 +func (p *MethodIndices) DataStreamsStats() *indices_data_streams_stats.DataStreamsStats { + _datastreamsstats := indices_data_streams_stats.NewDataStreamsStatsFunc(p.tp) + return _datastreamsstats() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-delete +func (p *MethodIndices) Delete(index string) *indices_delete.Delete { + _delete := indices_delete.NewDeleteFunc(p.tp) + return _delete(index) +} + +// Delete an alias. +// Removes a data stream or index from an alias. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-alias +func (p *MethodIndices) DeleteAlias(index, name string) *indices_delete_alias.DeleteAlias { + _deletealias := indices_delete_alias.NewDeleteAliasFunc(p.tp) + return _deletealias(index, name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-lifecycle +func (p *MethodIndices) DeleteDataLifecycle(name string) *indices_delete_data_lifecycle.DeleteDataLifecycle { + _deletedatalifecycle := indices_delete_data_lifecycle.NewDeleteDataLifecycleFunc(p.tp) + return _deletedatalifecycle(name) +} + +// Delete data streams. +// Deletes one or more data streams and their backing indices. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-delete-data-stream +func (p *MethodIndices) DeleteDataStream(name string) *indices_delete_data_stream.DeleteDataStream { + _deletedatastream := indices_delete_data_stream.NewDeleteDataStreamFunc(p.tp) + return _deletedatastream(name) +} + +// Delete data stream options. +// Removes the data stream options from a data stream. +// https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html +func (p *MethodIndices) DeleteDataStreamOptions(name string) *indices_delete_data_stream_options.DeleteDataStreamOptions { + _deletedatastreamoptions := indices_delete_data_stream_options.NewDeleteDataStreamOptionsFunc(p.tp) + return _deletedatastreamoptions(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-delete-index-template +func (p *MethodIndices) DeleteIndexTemplate(name string) *indices_delete_index_template.DeleteIndexTemplate { + _deleteindextemplate := indices_delete_index_template.NewDeleteIndexTemplateFunc(p.tp) + return _deleteindextemplate(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-delete-template +func (p *MethodIndices) DeleteTemplate(name string) *indices_delete_template.DeleteTemplate { + _deletetemplate := indices_delete_template.NewDeleteTemplateFunc(p.tp) + return _deletetemplate(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-disk-usage +func (p *MethodIndices) DiskUsage(index string) *indices_disk_usage.DiskUsage { + _diskusage := indices_disk_usage.NewDiskUsageFunc(p.tp) + return _diskusage(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-downsample +func (p *MethodIndices) Downsample(index, targetindex string) *indices_downsample.Downsample { + _downsample := indices_downsample.NewDownsampleFunc(p.tp) + return _downsample(index, targetindex) +} + +// Check indices. +// Check if one or more indices, index aliases, or data streams exist. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists +func (p *MethodIndices) Exists(index string) *indices_exists.Exists { + _exists := indices_exists.NewExistsFunc(p.tp) + return _exists(index) +} + +// Check aliases. +// +// Check if one or more data stream or index aliases exist. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-alias +func (p *MethodIndices) ExistsAlias(name string) *indices_exists_alias.ExistsAlias { + _existsalias := indices_exists_alias.NewExistsAliasFunc(p.tp) + return _existsalias(name) +} + +// Check index templates. +// +// Check whether index templates exist. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-exists-index-template +func (p *MethodIndices) ExistsIndexTemplate(name string) *indices_exists_index_template.ExistsIndexTemplate { + _existsindextemplate := indices_exists_index_template.NewExistsIndexTemplateFunc(p.tp) + return _existsindextemplate(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-exists-template +func (p *MethodIndices) ExistsTemplate(name string) *indices_exists_template.ExistsTemplate { + _existstemplate := indices_exists_template.NewExistsTemplateFunc(p.tp) + return _existstemplate(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-explain-data-lifecycle +func (p *MethodIndices) ExplainDataLifecycle(index string) *indices_explain_data_lifecycle.ExplainDataLifecycle { + _explaindatalifecycle := indices_explain_data_lifecycle.NewExplainDataLifecycleFunc(p.tp) + return _explaindatalifecycle(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-field-usage-stats +func (p *MethodIndices) FieldUsageStats(index string) *indices_field_usage_stats.FieldUsageStats { + _fieldusagestats := indices_field_usage_stats.NewFieldUsageStatsFunc(p.tp) + return _fieldusagestats(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-flush +func (p *MethodIndices) Flush() *indices_flush.Flush { + _flush := indices_flush.NewFlushFunc(p.tp) + return _flush() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-forcemerge +func (p *MethodIndices) Forcemerge() *indices_forcemerge.Forcemerge { + _forcemerge := indices_forcemerge.NewForcemergeFunc(p.tp) + return _forcemerge() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-get +func (p *MethodIndices) Get(index string) *indices_get.Get { + _get := indices_get.NewGetFunc(p.tp) + return _get(index) +} + +// Get aliases. +// Retrieves information for one or more data stream or index aliases. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-alias +func (p *MethodIndices) GetAlias() *indices_get_alias.GetAlias { + _getalias := indices_get_alias.NewGetAliasFunc(p.tp) + return _getalias() +} + +// Get data stream lifecycles. +// +// Get the data stream lifecycle configuration of one or more data streams. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle +func (p *MethodIndices) GetDataLifecycle(name string) *indices_get_data_lifecycle.GetDataLifecycle { + _getdatalifecycle := indices_get_data_lifecycle.NewGetDataLifecycleFunc(p.tp) + return _getdatalifecycle(name) +} + +// Get data stream lifecycle stats. +// Get statistics about the data streams that are managed by a data stream +// lifecycle. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-lifecycle-stats +func (p *MethodIndices) GetDataLifecycleStats() *indices_get_data_lifecycle_stats.GetDataLifecycleStats { + _getdatalifecyclestats := indices_get_data_lifecycle_stats.NewGetDataLifecycleStatsFunc(p.tp) + return _getdatalifecyclestats() +} + +// Get data streams. +// +// Get information about one or more data streams. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream +func (p *MethodIndices) GetDataStream() *indices_get_data_stream.GetDataStream { + _getdatastream := indices_get_data_stream.NewGetDataStreamFunc(p.tp) + return _getdatastream() +} + +// Get data stream options. +// +// Get the data stream options configuration of one or more data streams. +// https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html +func (p *MethodIndices) GetDataStreamOptions(name string) *indices_get_data_stream_options.GetDataStreamOptions { + _getdatastreamoptions := indices_get_data_stream_options.NewGetDataStreamOptionsFunc(p.tp) + return _getdatastreamoptions(name) +} + +// Get data stream settings. +// +// Get setting information for one or more data streams. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-settings +func (p *MethodIndices) GetDataStreamSettings(name string) *indices_get_data_stream_settings.GetDataStreamSettings { + _getdatastreamsettings := indices_get_data_stream_settings.NewGetDataStreamSettingsFunc(p.tp) + return _getdatastreamsettings(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping +func (p *MethodIndices) GetFieldMapping(fields string) *indices_get_field_mapping.GetFieldMapping { + _getfieldmapping := indices_get_field_mapping.NewGetFieldMappingFunc(p.tp) + return _getfieldmapping(fields) +} + +// Get index templates. +// Get information about one or more index templates. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-index-template +func (p *MethodIndices) GetIndexTemplate() *indices_get_index_template.GetIndexTemplate { + _getindextemplate := indices_get_index_template.NewGetIndexTemplateFunc(p.tp) + return _getindextemplate() +} + +// Get mapping definitions. +// For data streams, the API retrieves mappings for the stream’s backing +// indices. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-mapping +func (p *MethodIndices) GetMapping() *indices_get_mapping.GetMapping { + _getmapping := indices_get_mapping.NewGetMappingFunc(p.tp) + return _getmapping() +} + +// Get the migration reindexing status. +// +// Get the status of a migration reindex attempt for a data stream or index. +// https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-migration +func (p *MethodIndices) GetMigrateReindexStatus(index string) *indices_get_migrate_reindex_status.GetMigrateReindexStatus { + _getmigratereindexstatus := indices_get_migrate_reindex_status.NewGetMigrateReindexStatusFunc(p.tp) + return _getmigratereindexstatus(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-get-settings +func (p *MethodIndices) GetSettings() *indices_get_settings.GetSettings { + _getsettings := indices_get_settings.NewGetSettingsFunc(p.tp) + return _getsettings() +} + +// Get legacy 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/docs/api/doc/elasticsearch/operation/operation-indices-get-template +func (p *MethodIndices) GetTemplate() *indices_get_template.GetTemplate { + _gettemplate := indices_get_template.NewGetTemplateFunc(p.tp) + return _gettemplate() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-migrate-reindex +func (p *MethodIndices) MigrateReindex() *indices_migrate_reindex.MigrateReindex { + _migratereindex := indices_migrate_reindex.NewMigrateReindexFunc(p.tp) + return _migratereindex() +} + +// 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/operation/operation-indices-migrate-to-data-stream +func (p *MethodIndices) MigrateToDataStream(name string) *indices_migrate_to_data_stream.MigrateToDataStream { + _migratetodatastream := indices_migrate_to_data_stream.NewMigrateToDataStreamFunc(p.tp) + return _migratetodatastream(name) +} + +// Update data streams. +// Performs one or more data stream modification actions in a single atomic +// operation. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-modify-data-stream +func (p *MethodIndices) ModifyDataStream() *indices_modify_data_stream.ModifyDataStream { + _modifydatastream := indices_modify_data_stream.NewModifyDataStreamFunc(p.tp) + return _modifydatastream() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-open +func (p *MethodIndices) Open(index string) *indices_open.Open { + _open := indices_open.NewOpenFunc(p.tp) + return _open(index) +} + +// 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/operation/operation-indices-promote-data-stream +func (p *MethodIndices) PromoteDataStream(name string) *indices_promote_data_stream.PromoteDataStream { + _promotedatastream := indices_promote_data_stream.NewPromoteDataStreamFunc(p.tp) + return _promotedatastream(name) +} + +// Create or update an alias. +// Adds a data stream or index to an alias. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-alias +func (p *MethodIndices) PutAlias(index, name string) *indices_put_alias.PutAlias { + _putalias := indices_put_alias.NewPutAliasFunc(p.tp) + return _putalias(index, name) +} + +// Update data stream lifecycles. +// Update the data stream lifecycle of the specified data streams. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-lifecycle +func (p *MethodIndices) PutDataLifecycle(name string) *indices_put_data_lifecycle.PutDataLifecycle { + _putdatalifecycle := indices_put_data_lifecycle.NewPutDataLifecycleFunc(p.tp) + return _putdatalifecycle(name) +} + +// Update data stream options. +// Update the data stream options of the specified data streams. +// https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html +func (p *MethodIndices) PutDataStreamOptions(name string) *indices_put_data_stream_options.PutDataStreamOptions { + _putdatastreamoptions := indices_put_data_stream_options.NewPutDataStreamOptionsFunc(p.tp) + return _putdatastreamoptions(name) +} + +// Update data stream settings. +// +// This API can be used to override settings on specific data streams. These +// overrides will take precedence over what +// is specified in the template that the data stream matches. To prevent your +// data stream from getting into an invalid state, +// only certain settings are allowed. If possible, the setting change is applied +// to all +// backing indices. Otherwise, it will be applied when the data stream is next +// rolled over. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-settings +func (p *MethodIndices) PutDataStreamSettings(name string) *indices_put_data_stream_settings.PutDataStreamSettings { + _putdatastreamsettings := indices_put_data_stream_settings.NewPutDataStreamSettingsFunc(p.tp) + return _putdatastreamsettings(name) +} + +// 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/operation/operation-indices-put-index-template +func (p *MethodIndices) PutIndexTemplate(name string) *indices_put_index_template.PutIndexTemplate { + _putindextemplate := indices_put_index_template.NewPutIndexTemplateFunc(p.tp) + return _putindextemplate(name) +} + +// Update field mappings. +// Add new fields to an existing data stream or index. +// You can use the update mapping API to: +// +// - Add a new field to an existing index +// - Update mappings for multiple indices in a single request +// - Add new properties to an object field +// - Enable multi-fields for an existing field +// - Update supported mapping parameters +// - Change a field's mapping using reindexing +// - Rename a field using a field alias +// +// Learn how to use the update mapping API with practical examples in the +// [Update mapping API +// examples](https://www.elastic.co/docs//manage-data/data-store/mapping/update-mappings-examples) +// guide. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping +func (p *MethodIndices) PutMapping(index string) *indices_put_mapping.PutMapping { + _putmapping := indices_put_mapping.NewPutMappingFunc(p.tp) + return _putmapping(index) +} + +// 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 settings documentation. +// To preserve existing settings from being updated, set the `preserve_existing` +// parameter to `true`. +// +// For performance optimization during bulk indexing, you can disable the +// refresh interval. +// Refer to [disable refresh +// interval](https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval) +// for an example. +// 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. +// 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. +// Refer to [updating analyzers on existing +// indices](https://www.elastic.co/docs/manage-data/data-store/text-analysis/specify-an-analyzer#update-analyzers-on-existing-indices) +// for step-by-step examples. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings +func (p *MethodIndices) PutSettings() *indices_put_settings.PutSettings { + _putsettings := indices_put_settings.NewPutSettingsFunc(p.tp) + return _putsettings() +} + +// 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 +// 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/docs/api/doc/elasticsearch/operation/operation-indices-put-template +func (p *MethodIndices) PutTemplate(name string) *indices_put_template.PutTemplate { + _puttemplate := indices_put_template.NewPutTemplateFunc(p.tp) + return _puttemplate(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-recovery +func (p *MethodIndices) Recovery() *indices_recovery.Recovery { + _recovery := indices_recovery.NewRecoveryFunc(p.tp) + return _recovery() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-refresh +func (p *MethodIndices) Refresh() *indices_refresh.Refresh { + _refresh := indices_refresh.NewRefreshFunc(p.tp) + return _refresh() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-reload-search-analyzers +func (p *MethodIndices) ReloadSearchAnalyzers(index string) *indices_reload_search_analyzers.ReloadSearchAnalyzers { + _reloadsearchanalyzers := indices_reload_search_analyzers.NewReloadSearchAnalyzersFunc(p.tp) + return _reloadsearchanalyzers(index) +} + +// Remove an index block. +// +// Remove an index block from an index. +// Index blocks limit the operations allowed on an index by blocking specific +// operation types. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-remove-block +func (p *MethodIndices) RemoveBlock(index, block string) *indices_remove_block.RemoveBlock { + _removeblock := indices_remove_block.NewRemoveBlockFunc(p.tp) + return _removeblock(index, block) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-resolve-cluster +func (p *MethodIndices) ResolveCluster() *indices_resolve_cluster.ResolveCluster { + _resolvecluster := indices_resolve_cluster.NewResolveClusterFunc(p.tp) + return _resolvecluster() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-resolve-index +func (p *MethodIndices) ResolveIndex(name string) *indices_resolve_index.ResolveIndex { + _resolveindex := indices_resolve_index.NewResolveIndexFunc(p.tp) + return _resolveindex(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-rollover +func (p *MethodIndices) Rollover(alias string) *indices_rollover.Rollover { + _rollover := indices_rollover.NewRolloverFunc(p.tp) + return _rollover(alias) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-segments +func (p *MethodIndices) Segments() *indices_segments.Segments { + _segments := indices_segments.NewSegmentsFunc(p.tp) + return _segments() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-shard-stores +func (p *MethodIndices) ShardStores() *indices_shard_stores.ShardStores { + _shardstores := indices_shard_stores.NewShardStoresFunc(p.tp) + return _shardstores() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-shrink +func (p *MethodIndices) Shrink(index, target string) *indices_shrink.Shrink { + _shrink := indices_shrink.NewShrinkFunc(p.tp) + return _shrink(index, target) +} + +// Simulate an index. +// Get the index configuration that would be applied to the specified index from +// an existing index template. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-index-template +func (p *MethodIndices) SimulateIndexTemplate(name string) *indices_simulate_index_template.SimulateIndexTemplate { + _simulateindextemplate := indices_simulate_index_template.NewSimulateIndexTemplateFunc(p.tp) + return _simulateindextemplate(name) +} + +// Simulate an index template. +// Get the index configuration that would be applied by a particular index +// template. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-simulate-template +func (p *MethodIndices) SimulateTemplate() *indices_simulate_template.SimulateTemplate { + _simulatetemplate := indices_simulate_template.NewSimulateTemplateFunc(p.tp) + return _simulatetemplate() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-split +func (p *MethodIndices) Split(index, target string) *indices_split.Split { + _split := indices_split.NewSplitFunc(p.tp) + return _split(index, target) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-indices-stats +func (p *MethodIndices) Stats() *indices_stats.Stats { + _stats := indices_stats.NewStatsFunc(p.tp) + return _stats() +} + +// Create or update an alias. +// Adds a data stream or index to an alias. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-update-aliases +func (p *MethodIndices) UpdateAliases() *indices_update_aliases.UpdateAliases { + _updatealiases := indices_update_aliases.NewUpdateAliasesFunc(p.tp) + return _updatealiases() +} + +// Validate a query. +// Validates a query without running it. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-validate-query +func (p *MethodIndices) ValidateQuery() *indices_validate_query.ValidateQuery { + _validatequery := indices_validate_query.NewValidateQueryFunc(p.tp) + return _validatequery() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-inference-unified-inference +func (p *MethodInference) ChatCompletionUnified(inferenceid string) *inference_chat_completion_unified.ChatCompletionUnified { + _chatcompletionunified := inference_chat_completion_unified.NewChatCompletionUnifiedFunc(p.tp) + return _chatcompletionunified(inferenceid) +} + +// Perform completion inference on the service +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference +func (p *MethodInference) Completion(inferenceid string) *inference_completion.Completion { + _completion := inference_completion.NewCompletionFunc(p.tp) + return _completion(inferenceid) +} + +// Delete an inference endpoint +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-delete +func (p *MethodInference) Delete(inferenceid string) *inference_delete.Delete { + _delete := inference_delete.NewDeleteFunc(p.tp) + return _delete(inferenceid) +} + +// Get an inference endpoint +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-get +func (p *MethodInference) Get() *inference_get.Get { + _get := inference_get.NewGetFunc(p.tp) + return _get() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-inference-inference +func (p *MethodInference) Inference(inferenceid string) *inference_inference.Inference { + _inference := inference_inference.NewInferenceFunc(p.tp) + return _inference(inferenceid) +} + +// Create an inference endpoint. +// +// 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. +// +// 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/docs/api/doc/elasticsearch/operation/operation-inference-put +func (p *MethodInference) Put(inferenceid string) *inference_put.Put { + _put := inference_put.NewPutFunc(p.tp) + return _put(inferenceid) +} + +// Create an AlibabaCloud AI Search inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `alibabacloud-ai-search` service. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-alibabacloud +func (p *MethodInference) PutAlibabacloud(tasktype, alibabacloudinferenceid string) *inference_put_alibabacloud.PutAlibabacloud { + _putalibabacloud := inference_put_alibabacloud.NewPutAlibabacloudFunc(p.tp) + return _putalibabacloud(tasktype, alibabacloudinferenceid) +} + +// Create an Amazon Bedrock inference endpoint. +// +// Create 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. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonbedrock +func (p *MethodInference) PutAmazonbedrock(tasktype, amazonbedrockinferenceid string) *inference_put_amazonbedrock.PutAmazonbedrock { + _putamazonbedrock := inference_put_amazonbedrock.NewPutAmazonbedrockFunc(p.tp) + return _putamazonbedrock(tasktype, amazonbedrockinferenceid) +} + +// 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 (p *MethodInference) PutAmazonsagemaker(tasktype, amazonsagemakerinferenceid string) *inference_put_amazonsagemaker.PutAmazonsagemaker { + _putamazonsagemaker := inference_put_amazonsagemaker.NewPutAmazonsagemakerFunc(p.tp) + return _putamazonsagemaker(tasktype, amazonsagemakerinferenceid) +} + +// Create an Anthropic inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `anthropic` service. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-anthropic +func (p *MethodInference) PutAnthropic(tasktype, anthropicinferenceid string) *inference_put_anthropic.PutAnthropic { + _putanthropic := inference_put_anthropic.NewPutAnthropicFunc(p.tp) + return _putanthropic(tasktype, anthropicinferenceid) +} + +// Create an Azure AI studio inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `azureaistudio` service. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-azureaistudio +func (p *MethodInference) PutAzureaistudio(tasktype, azureaistudioinferenceid string) *inference_put_azureaistudio.PutAzureaistudio { + _putazureaistudio := inference_put_azureaistudio.NewPutAzureaistudioFunc(p.tp) + return _putazureaistudio(tasktype, azureaistudioinferenceid) +} + +// 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). +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-azureopenai +func (p *MethodInference) PutAzureopenai(tasktype, azureopenaiinferenceid string) *inference_put_azureopenai.PutAzureopenai { + _putazureopenai := inference_put_azureopenai.NewPutAzureopenaiFunc(p.tp) + return _putazureopenai(tasktype, azureopenaiinferenceid) +} + +// Create a Cohere inference endpoint. +// +// Create an inference endpoint to perform an inference task with the `cohere` +// service. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-cohere +func (p *MethodInference) PutCohere(tasktype, cohereinferenceid string) *inference_put_cohere.PutCohere { + _putcohere := inference_put_cohere.NewPutCohereFunc(p.tp) + return _putcohere(tasktype, cohereinferenceid) +} + +// 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 (p *MethodInference) PutCustom(tasktype, custominferenceid string) *inference_put_custom.PutCustom { + _putcustom := inference_put_custom.NewPutCustomFunc(p.tp) + return _putcustom(tasktype, custominferenceid) +} + +// Create a DeepSeek inference endpoint. +// +// Create an inference endpoint to perform an inference task with the `deepseek` +// service. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-deepseek +func (p *MethodInference) PutDeepseek(tasktype, deepseekinferenceid string) *inference_put_deepseek.PutDeepseek { + _putdeepseek := inference_put_deepseek.NewPutDeepseekFunc(p.tp) + return _putdeepseek(tasktype, deepseekinferenceid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-inference-put-elasticsearch +func (p *MethodInference) PutElasticsearch(tasktype, elasticsearchinferenceid string) *inference_put_elasticsearch.PutElasticsearch { + _putelasticsearch := inference_put_elasticsearch.NewPutElasticsearchFunc(p.tp) + return _putelasticsearch(tasktype, elasticsearchinferenceid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-inference-put-elser +func (p *MethodInference) PutElser(tasktype, elserinferenceid string) *inference_put_elser.PutElser { + _putelser := inference_put_elser.NewPutElserFunc(p.tp) + return _putelser(tasktype, elserinferenceid) +} + +// Create an Google AI Studio inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `googleaistudio` service. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-googleaistudio +func (p *MethodInference) PutGoogleaistudio(tasktype, googleaistudioinferenceid string) *inference_put_googleaistudio.PutGoogleaistudio { + _putgoogleaistudio := inference_put_googleaistudio.NewPutGoogleaistudioFunc(p.tp) + return _putgoogleaistudio(tasktype, googleaistudioinferenceid) +} + +// Create a Google Vertex AI inference endpoint. +// +// Create an inference endpoint to perform an inference task with the +// `googlevertexai` service. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-googlevertexai +func (p *MethodInference) PutGooglevertexai(tasktype, googlevertexaiinferenceid string) *inference_put_googlevertexai.PutGooglevertexai { + _putgooglevertexai := inference_put_googlevertexai.NewPutGooglevertexaiFunc(p.tp) + return _putgooglevertexai(tasktype, googlevertexaiinferenceid) +} + +// 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`. +// +// 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. +// +// 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` +// * `all-mpnet-base-v2` +// * `e5-base-v2` +// * `e5-small-v2` +// * `multilingual-e5-base` +// * `multilingual-e5-small` +// +// 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/docs/api/doc/elasticsearch/operation/operation-inference-put-hugging-face +func (p *MethodInference) PutHuggingFace(tasktype, huggingfaceinferenceid string) *inference_put_hugging_face.PutHuggingFace { + _puthuggingface := inference_put_hugging_face.NewPutHuggingFaceFunc(p.tp) + return _puthuggingface(tasktype, huggingfaceinferenceid) +} + +// 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 +// . +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-jinaai +func (p *MethodInference) PutJinaai(tasktype, jinaaiinferenceid string) *inference_put_jinaai.PutJinaai { + _putjinaai := inference_put_jinaai.NewPutJinaaiFunc(p.tp) + return _putjinaai(tasktype, jinaaiinferenceid) +} + +// Create a Mistral inference endpoint. +// +// Create an inference endpoint to perform an inference task with the `mistral` +// service. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-mistral +func (p *MethodInference) PutMistral(tasktype, mistralinferenceid string) *inference_put_mistral.PutMistral { + _putmistral := inference_put_mistral.NewPutMistralFunc(p.tp) + return _putmistral(tasktype, mistralinferenceid) +} + +// Create an OpenAI inference endpoint. +// +// Create an inference endpoint to perform an inference task with the `openai` +// service or `openai` compatible APIs. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-openai +func (p *MethodInference) PutOpenai(tasktype, openaiinferenceid string) *inference_put_openai.PutOpenai { + _putopenai := inference_put_openai.NewPutOpenaiFunc(p.tp) + return _putopenai(tasktype, openaiinferenceid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-inference-put-voyageai +func (p *MethodInference) PutVoyageai(tasktype, voyageaiinferenceid string) *inference_put_voyageai.PutVoyageai { + _putvoyageai := inference_put_voyageai.NewPutVoyageaiFunc(p.tp) + return _putvoyageai(tasktype, voyageaiinferenceid) +} + +// 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. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-put-watsonx +func (p *MethodInference) PutWatsonx(tasktype, watsonxinferenceid string) *inference_put_watsonx.PutWatsonx { + _putwatsonx := inference_put_watsonx.NewPutWatsonxFunc(p.tp) + return _putwatsonx(tasktype, watsonxinferenceid) +} + +// Perform reranking inference on the service +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference +func (p *MethodInference) Rerank(inferenceid string) *inference_rerank.Rerank { + _rerank := inference_rerank.NewRerankFunc(p.tp) + return _rerank(inferenceid) +} + +// Perform sparse embedding inference on the service +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference +func (p *MethodInference) SparseEmbedding(inferenceid string) *inference_sparse_embedding.SparseEmbedding { + _sparseembedding := inference_sparse_embedding.NewSparseEmbeddingFunc(p.tp) + return _sparseembedding(inferenceid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-inference-stream-inference +func (p *MethodInference) StreamCompletion(inferenceid string) *inference_stream_completion.StreamCompletion { + _streamcompletion := inference_stream_completion.NewStreamCompletionFunc(p.tp) + return _streamcompletion(inferenceid) +} + +// Perform text embedding inference on the service +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-inference-inference +func (p *MethodInference) TextEmbedding(inferenceid string) *inference_text_embedding.TextEmbedding { + _textembedding := inference_text_embedding.NewTextEmbeddingFunc(p.tp) + return _textembedding(inferenceid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-inference-update +func (p *MethodInference) Update(inferenceid string) *inference_update.Update { + _update := inference_update.NewUpdateFunc(p.tp) + return _update(inferenceid) +} + +// Delete GeoIP database configurations. +// +// Delete one or more IP geolocation database configurations. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-geoip-database +func (p *MethodIngest) DeleteGeoipDatabase(id string) *ingest_delete_geoip_database.DeleteGeoipDatabase { + _deletegeoipdatabase := ingest_delete_geoip_database.NewDeleteGeoipDatabaseFunc(p.tp) + return _deletegeoipdatabase(id) +} + +// Delete IP geolocation database configurations. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-ip-location-database +func (p *MethodIngest) DeleteIpLocationDatabase(id string) *ingest_delete_ip_location_database.DeleteIpLocationDatabase { + _deleteiplocationdatabase := ingest_delete_ip_location_database.NewDeleteIpLocationDatabaseFunc(p.tp) + return _deleteiplocationdatabase(id) +} + +// Delete pipelines. +// Delete one or more ingest pipelines. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-delete-pipeline +func (p *MethodIngest) DeletePipeline(id string) *ingest_delete_pipeline.DeletePipeline { + _deletepipeline := ingest_delete_pipeline.NewDeletePipelineFunc(p.tp) + return _deletepipeline(id) +} + +// Get GeoIP statistics. +// Get download statistics for GeoIP2 databases that are used with the GeoIP +// processor. +// https://www.elastic.co/docs/reference/enrich-processor/geoip-processor +func (p *MethodIngest) GeoIpStats() *ingest_geo_ip_stats.GeoIpStats { + _geoipstats := ingest_geo_ip_stats.NewGeoIpStatsFunc(p.tp) + return _geoipstats() +} + +// Get GeoIP database configurations. +// +// Get information about one or more IP geolocation database configurations. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-geoip-database +func (p *MethodIngest) GetGeoipDatabase() *ingest_get_geoip_database.GetGeoipDatabase { + _getgeoipdatabase := ingest_get_geoip_database.NewGetGeoipDatabaseFunc(p.tp) + return _getgeoipdatabase() +} + +// Get IP geolocation database configurations. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-ip-location-database +func (p *MethodIngest) GetIpLocationDatabase() *ingest_get_ip_location_database.GetIpLocationDatabase { + _getiplocationdatabase := ingest_get_ip_location_database.NewGetIpLocationDatabaseFunc(p.tp) + return _getiplocationdatabase() +} + +// Get pipelines. +// +// Get information about one or more ingest pipelines. +// This API returns a local reference of the pipeline. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-get-pipeline +func (p *MethodIngest) GetPipeline() *ingest_get_pipeline.GetPipeline { + _getpipeline := ingest_get_pipeline.NewGetPipelineFunc(p.tp) + return _getpipeline() +} + +// 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/docs/reference/enrich-processor/grok-processor +func (p *MethodIngest) ProcessorGrok() *ingest_processor_grok.ProcessorGrok { + _processorgrok := ingest_processor_grok.NewProcessorGrokFunc(p.tp) + return _processorgrok() +} + +// 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/operation/operation-ingest-put-geoip-database +func (p *MethodIngest) PutGeoipDatabase(id string) *ingest_put_geoip_database.PutGeoipDatabase { + _putgeoipdatabase := ingest_put_geoip_database.NewPutGeoipDatabaseFunc(p.tp) + return _putgeoipdatabase(id) +} + +// Create or update an IP geolocation database configuration. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ingest-put-ip-location-database +func (p *MethodIngest) PutIpLocationDatabase(id string) *ingest_put_ip_location_database.PutIpLocationDatabase { + _putiplocationdatabase := ingest_put_ip_location_database.NewPutIpLocationDatabaseFunc(p.tp) + return _putiplocationdatabase(id) +} + +// Create or update a pipeline. +// Changes made using this API take effect immediately. +// https://www.elastic.co/docs/manage-data/ingest/transform-enrich/ingest-pipelines +func (p *MethodIngest) PutPipeline(id string) *ingest_put_pipeline.PutPipeline { + _putpipeline := ingest_put_pipeline.NewPutPipelineFunc(p.tp) + return _putpipeline(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ingest-simulate +func (p *MethodIngest) Simulate() *ingest_simulate.Simulate { + _simulate := ingest_simulate.NewSimulateFunc(p.tp) + return _simulate() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-license-delete +func (p *MethodLicense) Delete() *license_delete.Delete { + _delete := license_delete.NewDeleteFunc(p.tp) + return _delete() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-license-get +func (p *MethodLicense) Get() *license_get.Get { + _get := license_get.NewGetFunc(p.tp) + return _get() +} + +// Get the basic license status. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-basic-status +func (p *MethodLicense) GetBasicStatus() *license_get_basic_status.GetBasicStatus { + _getbasicstatus := license_get_basic_status.NewGetBasicStatusFunc(p.tp) + return _getbasicstatus() +} + +// Get the trial status. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-license-get-trial-status +func (p *MethodLicense) GetTrialStatus() *license_get_trial_status.GetTrialStatus { + _gettrialstatus := license_get_trial_status.NewGetTrialStatusFunc(p.tp) + return _gettrialstatus() +} + +// 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/operation/operation-license-post +func (p *MethodLicense) Post() *license_post.Post { + _post := license_post.NewPostFunc(p.tp) + return _post() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-license-post-start-basic +func (p *MethodLicense) PostStartBasic() *license_post_start_basic.PostStartBasic { + _poststartbasic := license_post_start_basic.NewPostStartBasicFunc(p.tp) + return _poststartbasic() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-license-post-start-trial +func (p *MethodLicense) PostStartTrial() *license_post_start_trial.PostStartTrial { + _poststarttrial := license_post_start_trial.NewPostStartTrialFunc(p.tp) + return _poststarttrial() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-logstash-delete-pipeline +func (p *MethodLogstash) DeletePipeline(id string) *logstash_delete_pipeline.DeletePipeline { + _deletepipeline := logstash_delete_pipeline.NewDeletePipelineFunc(p.tp) + return _deletepipeline(id) +} + +// Get Logstash pipelines. +// Get pipelines that are used for Logstash Central Management. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-logstash-get-pipeline +func (p *MethodLogstash) GetPipeline() *logstash_get_pipeline.GetPipeline { + _getpipeline := logstash_get_pipeline.NewGetPipelineFunc(p.tp) + return _getpipeline() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-logstash-put-pipeline +func (p *MethodLogstash) PutPipeline(id string) *logstash_put_pipeline.PutPipeline { + _putpipeline := logstash_put_pipeline.NewPutPipelineFunc(p.tp) + return _putpipeline(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-migration-deprecations +func (p *MethodMigration) Deprecations() *migration_deprecations.Deprecations { + _deprecations := migration_deprecations.NewDeprecationsFunc(p.tp) + return _deprecations() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-migration-get-feature-upgrade-status +func (p *MethodMigration) GetFeatureUpgradeStatus() *migration_get_feature_upgrade_status.GetFeatureUpgradeStatus { + _getfeatureupgradestatus := migration_get_feature_upgrade_status.NewGetFeatureUpgradeStatusFunc(p.tp) + return _getfeatureupgradestatus() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-migration-get-feature-upgrade-status +func (p *MethodMigration) PostFeatureUpgrade() *migration_post_feature_upgrade.PostFeatureUpgrade { + _postfeatureupgrade := migration_post_feature_upgrade.NewPostFeatureUpgradeFunc(p.tp) + return _postfeatureupgrade() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-clear-trained-model-deployment-cache +func (p *MethodMl) ClearTrainedModelDeploymentCache(modelid string) *ml_clear_trained_model_deployment_cache.ClearTrainedModelDeploymentCache { + _cleartrainedmodeldeploymentcache := ml_clear_trained_model_deployment_cache.NewClearTrainedModelDeploymentCacheFunc(p.tp) + return _cleartrainedmodeldeploymentcache(modelid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-close-job +func (p *MethodMl) CloseJob(jobid string) *ml_close_job.CloseJob { + _closejob := ml_close_job.NewCloseJobFunc(p.tp) + return _closejob(jobid) +} + +// Delete a calendar. +// +// Remove all scheduled events from a calendar, then delete it. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar +func (p *MethodMl) DeleteCalendar(calendarid string) *ml_delete_calendar.DeleteCalendar { + _deletecalendar := ml_delete_calendar.NewDeleteCalendarFunc(p.tp) + return _deletecalendar(calendarid) +} + +// Delete events from a calendar. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar-event +func (p *MethodMl) DeleteCalendarEvent(calendarid, eventid string) *ml_delete_calendar_event.DeleteCalendarEvent { + _deletecalendarevent := ml_delete_calendar_event.NewDeleteCalendarEventFunc(p.tp) + return _deletecalendarevent(calendarid, eventid) +} + +// Delete anomaly jobs from a calendar. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-calendar-job +func (p *MethodMl) DeleteCalendarJob(calendarid, jobid string) *ml_delete_calendar_job.DeleteCalendarJob { + _deletecalendarjob := ml_delete_calendar_job.NewDeleteCalendarJobFunc(p.tp) + return _deletecalendarjob(calendarid, jobid) +} + +// Delete a data frame analytics job. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-data-frame-analytics +func (p *MethodMl) DeleteDataFrameAnalytics(id string) *ml_delete_data_frame_analytics.DeleteDataFrameAnalytics { + _deletedataframeanalytics := ml_delete_data_frame_analytics.NewDeleteDataFrameAnalyticsFunc(p.tp) + return _deletedataframeanalytics(id) +} + +// Delete a datafeed. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-datafeed +func (p *MethodMl) DeleteDatafeed(datafeedid string) *ml_delete_datafeed.DeleteDatafeed { + _deletedatafeed := ml_delete_datafeed.NewDeleteDatafeedFunc(p.tp) + return _deletedatafeed(datafeedid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-expired-data +func (p *MethodMl) DeleteExpiredData() *ml_delete_expired_data.DeleteExpiredData { + _deleteexpireddata := ml_delete_expired_data.NewDeleteExpiredDataFunc(p.tp) + return _deleteexpireddata() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-filter +func (p *MethodMl) DeleteFilter(filterid string) *ml_delete_filter.DeleteFilter { + _deletefilter := ml_delete_filter.NewDeleteFilterFunc(p.tp) + return _deletefilter(filterid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-forecast +func (p *MethodMl) DeleteForecast(jobid string) *ml_delete_forecast.DeleteForecast { + _deleteforecast := ml_delete_forecast.NewDeleteForecastFunc(p.tp) + return _deleteforecast(jobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-job +func (p *MethodMl) DeleteJob(jobid string) *ml_delete_job.DeleteJob { + _deletejob := ml_delete_job.NewDeleteJobFunc(p.tp) + return _deletejob(jobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-model-snapshot +func (p *MethodMl) DeleteModelSnapshot(jobid, snapshotid string) *ml_delete_model_snapshot.DeleteModelSnapshot { + _deletemodelsnapshot := ml_delete_model_snapshot.NewDeleteModelSnapshotFunc(p.tp) + return _deletemodelsnapshot(jobid, snapshotid) +} + +// Delete an unreferenced trained model. +// +// The request deletes a trained inference model that is not referenced by an +// ingest pipeline. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-delete-trained-model +func (p *MethodMl) DeleteTrainedModel(modelid string) *ml_delete_trained_model.DeleteTrainedModel { + _deletetrainedmodel := ml_delete_trained_model.NewDeleteTrainedModelFunc(p.tp) + return _deletetrainedmodel(modelid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-delete-trained-model-alias +func (p *MethodMl) DeleteTrainedModelAlias(modelid, modelalias string) *ml_delete_trained_model_alias.DeleteTrainedModelAlias { + _deletetrainedmodelalias := ml_delete_trained_model_alias.NewDeleteTrainedModelAliasFunc(p.tp) + return _deletetrainedmodelalias(modelid, modelalias) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-estimate-model-memory +func (p *MethodMl) EstimateModelMemory() *ml_estimate_model_memory.EstimateModelMemory { + _estimatemodelmemory := ml_estimate_model_memory.NewEstimateModelMemoryFunc(p.tp) + return _estimatemodelmemory() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-evaluate-data-frame +func (p *MethodMl) EvaluateDataFrame() *ml_evaluate_data_frame.EvaluateDataFrame { + _evaluatedataframe := ml_evaluate_data_frame.NewEvaluateDataFrameFunc(p.tp) + return _evaluatedataframe() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-explain-data-frame-analytics +func (p *MethodMl) ExplainDataFrameAnalytics() *ml_explain_data_frame_analytics.ExplainDataFrameAnalytics { + _explaindataframeanalytics := ml_explain_data_frame_analytics.NewExplainDataFrameAnalyticsFunc(p.tp) + return _explaindataframeanalytics() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-flush-job +func (p *MethodMl) FlushJob(jobid string) *ml_flush_job.FlushJob { + _flushjob := ml_flush_job.NewFlushJobFunc(p.tp) + return _flushjob(jobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-forecast +func (p *MethodMl) Forecast(jobid string) *ml_forecast.Forecast { + _forecast := ml_forecast.NewForecastFunc(p.tp) + return _forecast(jobid) +} + +// Get anomaly detection job results for buckets. +// The API presents a chronological view of the records, grouped by bucket. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-buckets +func (p *MethodMl) GetBuckets(jobid string) *ml_get_buckets.GetBuckets { + _getbuckets := ml_get_buckets.NewGetBucketsFunc(p.tp) + return _getbuckets(jobid) +} + +// Get info about events in calendars. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-calendar-events +func (p *MethodMl) GetCalendarEvents(calendarid string) *ml_get_calendar_events.GetCalendarEvents { + _getcalendarevents := ml_get_calendar_events.NewGetCalendarEventsFunc(p.tp) + return _getcalendarevents(calendarid) +} + +// Get calendar configuration info. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-calendars +func (p *MethodMl) GetCalendars() *ml_get_calendars.GetCalendars { + _getcalendars := ml_get_calendars.NewGetCalendarsFunc(p.tp) + return _getcalendars() +} + +// Get anomaly detection job results for categories. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-categories +func (p *MethodMl) GetCategories(jobid string) *ml_get_categories.GetCategories { + _getcategories := ml_get_categories.NewGetCategoriesFunc(p.tp) + return _getcategories(jobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics +func (p *MethodMl) GetDataFrameAnalytics() *ml_get_data_frame_analytics.GetDataFrameAnalytics { + _getdataframeanalytics := ml_get_data_frame_analytics.NewGetDataFrameAnalyticsFunc(p.tp) + return _getdataframeanalytics() +} + +// Get data frame analytics job stats. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics-stats +func (p *MethodMl) GetDataFrameAnalyticsStats() *ml_get_data_frame_analytics_stats.GetDataFrameAnalyticsStats { + _getdataframeanalyticsstats := ml_get_data_frame_analytics_stats.NewGetDataFrameAnalyticsStatsFunc(p.tp) + return _getdataframeanalyticsstats() +} + +// 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 +// ``, 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/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeed-stats +func (p *MethodMl) GetDatafeedStats() *ml_get_datafeed_stats.GetDatafeedStats { + _getdatafeedstats := ml_get_datafeed_stats.NewGetDatafeedStatsFunc(p.tp) + return _getdatafeedstats() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-get-datafeeds +func (p *MethodMl) GetDatafeeds() *ml_get_datafeeds.GetDatafeeds { + _getdatafeeds := ml_get_datafeeds.NewGetDatafeedsFunc(p.tp) + return _getdatafeeds() +} + +// Get filters. +// You can get a single filter or all filters. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-filters +func (p *MethodMl) GetFilters() *ml_get_filters.GetFilters { + _getfilters := ml_get_filters.NewGetFiltersFunc(p.tp) + return _getfilters() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-get-influencers +func (p *MethodMl) GetInfluencers(jobid string) *ml_get_influencers.GetInfluencers { + _getinfluencers := ml_get_influencers.NewGetInfluencersFunc(p.tp) + return _getinfluencers(jobid) +} + +// Get anomaly detection job stats. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-job-stats +func (p *MethodMl) GetJobStats() *ml_get_job_stats.GetJobStats { + _getjobstats := ml_get_job_stats.NewGetJobStatsFunc(p.tp) + return _getjobstats() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-get-jobs +func (p *MethodMl) GetJobs() *ml_get_jobs.GetJobs { + _getjobs := ml_get_jobs.NewGetJobsFunc(p.tp) + return _getjobs() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-get-memory-stats +func (p *MethodMl) GetMemoryStats() *ml_get_memory_stats.GetMemoryStats { + _getmemorystats := ml_get_memory_stats.NewGetMemoryStatsFunc(p.tp) + return _getmemorystats() +} + +// Get anomaly detection job model snapshot upgrade usage info. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshot-upgrade-stats +func (p *MethodMl) GetModelSnapshotUpgradeStats(jobid, snapshotid string) *ml_get_model_snapshot_upgrade_stats.GetModelSnapshotUpgradeStats { + _getmodelsnapshotupgradestats := ml_get_model_snapshot_upgrade_stats.NewGetModelSnapshotUpgradeStatsFunc(p.tp) + return _getmodelsnapshotupgradestats(jobid, snapshotid) +} + +// Get model snapshots info. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-model-snapshots +func (p *MethodMl) GetModelSnapshots(jobid string) *ml_get_model_snapshots.GetModelSnapshots { + _getmodelsnapshots := ml_get_model_snapshots.NewGetModelSnapshotsFunc(p.tp) + return _getmodelsnapshots(jobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-get-overall-buckets +func (p *MethodMl) GetOverallBuckets(jobid string) *ml_get_overall_buckets.GetOverallBuckets { + _getoverallbuckets := ml_get_overall_buckets.NewGetOverallBucketsFunc(p.tp) + return _getoverallbuckets(jobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-get-records +func (p *MethodMl) GetRecords(jobid string) *ml_get_records.GetRecords { + _getrecords := ml_get_records.NewGetRecordsFunc(p.tp) + return _getrecords(jobid) +} + +// Get trained model configuration info. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-get-trained-models +func (p *MethodMl) GetTrainedModels() *ml_get_trained_models.GetTrainedModels { + _gettrainedmodels := ml_get_trained_models.NewGetTrainedModelsFunc(p.tp) + return _gettrainedmodels() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-get-trained-models-stats +func (p *MethodMl) GetTrainedModelsStats() *ml_get_trained_models_stats.GetTrainedModelsStats { + _gettrainedmodelsstats := ml_get_trained_models_stats.NewGetTrainedModelsStatsFunc(p.tp) + return _gettrainedmodelsstats() +} + +// Evaluate a trained model. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-infer-trained-model +func (p *MethodMl) InferTrainedModel(modelid string) *ml_infer_trained_model.InferTrainedModel { + _infertrainedmodel := ml_infer_trained_model.NewInferTrainedModelFunc(p.tp) + return _infertrainedmodel(modelid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-info +func (p *MethodMl) Info() *ml_info.Info { + _info := ml_info.NewInfoFunc(p.tp) + return _info() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-open-job +func (p *MethodMl) OpenJob(jobid string) *ml_open_job.OpenJob { + _openjob := ml_open_job.NewOpenJobFunc(p.tp) + return _openjob(jobid) +} + +// Add scheduled events to the calendar. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-post-calendar-events +func (p *MethodMl) PostCalendarEvents(calendarid string) *ml_post_calendar_events.PostCalendarEvents { + _postcalendarevents := ml_post_calendar_events.NewPostCalendarEventsFunc(p.tp) + return _postcalendarevents(calendarid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-post-data +func (p *MethodMl) PostData(jobid string) *ml_post_data.PostData { + _postdata := ml_post_data.NewPostDataFunc(p.tp) + return _postdata(jobid) +} + +// Preview features used by data frame analytics. +// Preview the extracted features used by a data frame analytics config. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-preview-data-frame-analytics +func (p *MethodMl) PreviewDataFrameAnalytics() *ml_preview_data_frame_analytics.PreviewDataFrameAnalytics { + _previewdataframeanalytics := ml_preview_data_frame_analytics.NewPreviewDataFrameAnalyticsFunc(p.tp) + return _previewdataframeanalytics() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-preview-datafeed +func (p *MethodMl) PreviewDatafeed() *ml_preview_datafeed.PreviewDatafeed { + _previewdatafeed := ml_preview_datafeed.NewPreviewDatafeedFunc(p.tp) + return _previewdatafeed() +} + +// Create a calendar. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar +func (p *MethodMl) PutCalendar(calendarid string) *ml_put_calendar.PutCalendar { + _putcalendar := ml_put_calendar.NewPutCalendarFunc(p.tp) + return _putcalendar(calendarid) +} + +// Add anomaly detection job to calendar. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-calendar-job +func (p *MethodMl) PutCalendarJob(calendarid, jobid string) *ml_put_calendar_job.PutCalendarJob { + _putcalendarjob := ml_put_calendar_job.NewPutCalendarJobFunc(p.tp) + return _putcalendarjob(calendarid, jobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-put-data-frame-analytics +func (p *MethodMl) PutDataFrameAnalytics(id string) *ml_put_data_frame_analytics.PutDataFrameAnalytics { + _putdataframeanalytics := ml_put_data_frame_analytics.NewPutDataFrameAnalyticsFunc(p.tp) + return _putdataframeanalytics(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-put-datafeed +func (p *MethodMl) PutDatafeed(datafeedid string) *ml_put_datafeed.PutDatafeed { + _putdatafeed := ml_put_datafeed.NewPutDatafeedFunc(p.tp) + return _putdatafeed(datafeedid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-put-filter +func (p *MethodMl) PutFilter(filterid string) *ml_put_filter.PutFilter { + _putfilter := ml_put_filter.NewPutFilterFunc(p.tp) + return _putfilter(filterid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-put-job +func (p *MethodMl) PutJob(jobid string) *ml_put_job.PutJob { + _putjob := ml_put_job.NewPutJobFunc(p.tp) + return _putjob(jobid) +} + +// Create a trained model. +// Enable you to supply a trained model that is not created by data frame +// analytics. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model +func (p *MethodMl) PutTrainedModel(modelid string) *ml_put_trained_model.PutTrainedModel { + _puttrainedmodel := ml_put_trained_model.NewPutTrainedModelFunc(p.tp) + return _puttrainedmodel(modelid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-alias +func (p *MethodMl) PutTrainedModelAlias(modelid, modelalias string) *ml_put_trained_model_alias.PutTrainedModelAlias { + _puttrainedmodelalias := ml_put_trained_model_alias.NewPutTrainedModelAliasFunc(p.tp) + return _puttrainedmodelalias(modelid, modelalias) +} + +// Create part of a trained model definition. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-definition-part +func (p *MethodMl) PutTrainedModelDefinitionPart(modelid, part string) *ml_put_trained_model_definition_part.PutTrainedModelDefinitionPart { + _puttrainedmodeldefinitionpart := ml_put_trained_model_definition_part.NewPutTrainedModelDefinitionPartFunc(p.tp) + return _puttrainedmodeldefinitionpart(modelid, part) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-put-trained-model-vocabulary +func (p *MethodMl) PutTrainedModelVocabulary(modelid string) *ml_put_trained_model_vocabulary.PutTrainedModelVocabulary { + _puttrainedmodelvocabulary := ml_put_trained_model_vocabulary.NewPutTrainedModelVocabularyFunc(p.tp) + return _puttrainedmodelvocabulary(modelid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-reset-job +func (p *MethodMl) ResetJob(jobid string) *ml_reset_job.ResetJob { + _resetjob := ml_reset_job.NewResetJobFunc(p.tp) + return _resetjob(jobid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-revert-model-snapshot +func (p *MethodMl) RevertModelSnapshot(jobid, snapshotid string) *ml_revert_model_snapshot.RevertModelSnapshot { + _revertmodelsnapshot := ml_revert_model_snapshot.NewRevertModelSnapshotFunc(p.tp) + return _revertmodelsnapshot(jobid, snapshotid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-set-upgrade-mode +func (p *MethodMl) SetUpgradeMode() *ml_set_upgrade_mode.SetUpgradeMode { + _setupgrademode := ml_set_upgrade_mode.NewSetUpgradeModeFunc(p.tp) + return _setupgrademode() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-start-data-frame-analytics +func (p *MethodMl) StartDataFrameAnalytics(id string) *ml_start_data_frame_analytics.StartDataFrameAnalytics { + _startdataframeanalytics := ml_start_data_frame_analytics.NewStartDataFrameAnalyticsFunc(p.tp) + return _startdataframeanalytics(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-start-datafeed +func (p *MethodMl) StartDatafeed(datafeedid string) *ml_start_datafeed.StartDatafeed { + _startdatafeed := ml_start_datafeed.NewStartDatafeedFunc(p.tp) + return _startdatafeed(datafeedid) +} + +// Start a trained model deployment. +// It allocates the model to every machine learning node. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-start-trained-model-deployment +func (p *MethodMl) StartTrainedModelDeployment(modelid string) *ml_start_trained_model_deployment.StartTrainedModelDeployment { + _starttrainedmodeldeployment := ml_start_trained_model_deployment.NewStartTrainedModelDeploymentFunc(p.tp) + return _starttrainedmodeldeployment(modelid) +} + +// Stop data frame analytics jobs. +// A data frame analytics job can be started and stopped multiple times +// throughout its lifecycle. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-data-frame-analytics +func (p *MethodMl) StopDataFrameAnalytics(id string) *ml_stop_data_frame_analytics.StopDataFrameAnalytics { + _stopdataframeanalytics := ml_stop_data_frame_analytics.NewStopDataFrameAnalyticsFunc(p.tp) + return _stopdataframeanalytics(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-stop-datafeed +func (p *MethodMl) StopDatafeed(datafeedid string) *ml_stop_datafeed.StopDatafeed { + _stopdatafeed := ml_stop_datafeed.NewStopDatafeedFunc(p.tp) + return _stopdatafeed(datafeedid) +} + +// Stop a trained model deployment. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-stop-trained-model-deployment +func (p *MethodMl) StopTrainedModelDeployment(modelid string) *ml_stop_trained_model_deployment.StopTrainedModelDeployment { + _stoptrainedmodeldeployment := ml_stop_trained_model_deployment.NewStopTrainedModelDeploymentFunc(p.tp) + return _stoptrainedmodeldeployment(modelid) +} + +// Update a data frame analytics job. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-data-frame-analytics +func (p *MethodMl) UpdateDataFrameAnalytics(id string) *ml_update_data_frame_analytics.UpdateDataFrameAnalytics { + _updatedataframeanalytics := ml_update_data_frame_analytics.NewUpdateDataFrameAnalyticsFunc(p.tp) + return _updatedataframeanalytics(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-update-datafeed +func (p *MethodMl) UpdateDatafeed(datafeedid string) *ml_update_datafeed.UpdateDatafeed { + _updatedatafeed := ml_update_datafeed.NewUpdateDatafeedFunc(p.tp) + return _updatedatafeed(datafeedid) +} + +// Update a filter. +// Updates the description of a filter, adds items, or removes items from the +// list. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-filter +func (p *MethodMl) UpdateFilter(filterid string) *ml_update_filter.UpdateFilter { + _updatefilter := ml_update_filter.NewUpdateFilterFunc(p.tp) + return _updatefilter(filterid) +} + +// Update an anomaly detection job. +// Updates certain properties of an anomaly detection job. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-job +func (p *MethodMl) UpdateJob(jobid string) *ml_update_job.UpdateJob { + _updatejob := ml_update_job.NewUpdateJobFunc(p.tp) + return _updatejob(jobid) +} + +// Update a snapshot. +// Updates certain properties of a snapshot. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-model-snapshot +func (p *MethodMl) UpdateModelSnapshot(jobid, snapshotid string) *ml_update_model_snapshot.UpdateModelSnapshot { + _updatemodelsnapshot := ml_update_model_snapshot.NewUpdateModelSnapshotFunc(p.tp) + return _updatemodelsnapshot(jobid, snapshotid) +} + +// Update a trained model deployment. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-ml-update-trained-model-deployment +func (p *MethodMl) UpdateTrainedModelDeployment(modelid string) *ml_update_trained_model_deployment.UpdateTrainedModelDeployment { + _updatetrainedmodeldeployment := ml_update_trained_model_deployment.NewUpdateTrainedModelDeploymentFunc(p.tp) + return _updatetrainedmodeldeployment(modelid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ml-upgrade-job-snapshot +func (p *MethodMl) UpgradeJobSnapshot(jobid, snapshotid string) *ml_upgrade_job_snapshot.UpgradeJobSnapshot { + _upgradejobsnapshot := ml_upgrade_job_snapshot.NewUpgradeJobSnapshotFunc(p.tp) + return _upgradejobsnapshot(jobid, snapshotid) +} + +// Validate an anomaly detection job. +// https://www.elastic.co/guide/en/machine-learning/current/ml-jobs.html +func (p *MethodMl) Validate() *ml_validate.Validate { + _validate := ml_validate.NewValidateFunc(p.tp) + return _validate() +} + +// Validate an anomaly detection job. +// https://www.elastic.co/docs/api/doc/elasticsearch +func (p *MethodMl) ValidateDetector() *ml_validate_detector.ValidateDetector { + _validatedetector := ml_validate_detector.NewValidateDetectorFunc(p.tp) + return _validatedetector() +} + +// Send monitoring data. +// This API is used by the monitoring features to send monitoring data. +// https://www.elastic.co/docs/api/doc/elasticsearch +func (p *MethodMonitoring) Bulk() *monitoring_bulk.Bulk { + _bulk := monitoring_bulk.NewBulkFunc(p.tp) + return _bulk() +} + +// Clear the archived repositories metering. +// Clear the archived repositories metering information in the cluster. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-clear-repositories-metering-archive +func (p *MethodNodes) ClearRepositoriesMeteringArchive(nodeid, maxarchiveversion string) *nodes_clear_repositories_metering_archive.ClearRepositoriesMeteringArchive { + _clearrepositoriesmeteringarchive := nodes_clear_repositories_metering_archive.NewClearRepositoriesMeteringArchiveFunc(p.tp) + return _clearrepositoriesmeteringarchive(nodeid, maxarchiveversion) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-nodes-get-repositories-metering-info +func (p *MethodNodes) GetRepositoriesMeteringInfo(nodeid string) *nodes_get_repositories_metering_info.GetRepositoriesMeteringInfo { + _getrepositoriesmeteringinfo := nodes_get_repositories_metering_info.NewGetRepositoriesMeteringInfoFunc(p.tp) + return _getrepositoriesmeteringinfo(nodeid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-nodes-hot-threads +func (p *MethodNodes) HotThreads() *nodes_hot_threads.HotThreads { + _hotthreads := nodes_hot_threads.NewHotThreadsFunc(p.tp) + return _hotthreads() +} + +// Get node information. +// +// By default, the API returns all attributes and core settings for cluster +// nodes. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-info +func (p *MethodNodes) Info() *nodes_info.Info { + _info := nodes_info.NewInfoFunc(p.tp) + return _info() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-nodes-reload-secure-settings +func (p *MethodNodes) ReloadSecureSettings() *nodes_reload_secure_settings.ReloadSecureSettings { + _reloadsecuresettings := nodes_reload_secure_settings.NewReloadSecureSettingsFunc(p.tp) + return _reloadsecuresettings() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-nodes-stats +func (p *MethodNodes) Stats() *nodes_stats.Stats { + _stats := nodes_stats.NewStatsFunc(p.tp) + return _stats() +} + +// Get feature usage information. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-nodes-usage +func (p *MethodNodes) Usage() *nodes_usage.Usage { + _usage := nodes_usage.NewUsageFunc(p.tp) + return _usage() +} + +// Extracts a UI-optimized structure to render flamegraphs from Universal +// Profiling. +// https://www.elastic.co/guide/en/observability/current/universal-profiling.html +func (p *MethodProfiling) Flamegraph() *profiling_flamegraph.Flamegraph { + _flamegraph := profiling_flamegraph.NewFlamegraphFunc(p.tp) + return _flamegraph() +} + +// Extracts raw stacktrace information from Universal Profiling. +// https://www.elastic.co/guide/en/observability/current/universal-profiling.html +func (p *MethodProfiling) Stacktraces() *profiling_stacktraces.Stacktraces { + _stacktraces := profiling_stacktraces.NewStacktracesFunc(p.tp) + return _stacktraces() +} + +// Returns basic information about the status of Universal Profiling. +// https://www.elastic.co/guide/en/observability/current/universal-profiling.html +func (p *MethodProfiling) Status() *profiling_status.Status { + _status := profiling_status.NewStatusFunc(p.tp) + return _status() +} + +// Extracts a list of topN functions from Universal Profiling. +// https://www.elastic.co/guide/en/observability/current/universal-profiling.html +func (p *MethodProfiling) TopnFunctions() *profiling_topn_functions.TopnFunctions { + _topnfunctions := profiling_topn_functions.NewTopnFunctionsFunc(p.tp) + return _topnfunctions() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-rule +func (p *MethodQueryRules) DeleteRule(rulesetid, ruleid string) *query_rules_delete_rule.DeleteRule { + _deleterule := query_rules_delete_rule.NewDeleteRuleFunc(p.tp) + return _deleterule(rulesetid, ruleid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-query-rules-delete-ruleset +func (p *MethodQueryRules) DeleteRuleset(rulesetid string) *query_rules_delete_ruleset.DeleteRuleset { + _deleteruleset := query_rules_delete_ruleset.NewDeleteRulesetFunc(p.tp) + return _deleteruleset(rulesetid) +} + +// Get a query rule. +// Get details about a query rule within a query ruleset. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-rule +func (p *MethodQueryRules) GetRule(rulesetid, ruleid string) *query_rules_get_rule.GetRule { + _getrule := query_rules_get_rule.NewGetRuleFunc(p.tp) + return _getrule(rulesetid, ruleid) +} + +// Get a query ruleset. +// Get details about a query ruleset. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-get-ruleset +func (p *MethodQueryRules) GetRuleset(rulesetid string) *query_rules_get_ruleset.GetRuleset { + _getruleset := query_rules_get_ruleset.NewGetRulesetFunc(p.tp) + return _getruleset(rulesetid) +} + +// Get all query rulesets. +// Get summarized information about the query rulesets. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-list-rulesets +func (p *MethodQueryRules) ListRulesets() *query_rules_list_rulesets.ListRulesets { + _listrulesets := query_rules_list_rulesets.NewListRulesetsFunc(p.tp) + return _listrulesets() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-query-rules-put-rule +func (p *MethodQueryRules) PutRule(rulesetid, ruleid string) *query_rules_put_rule.PutRule { + _putrule := query_rules_put_rule.NewPutRuleFunc(p.tp) + return _putrule(rulesetid, ruleid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-query-rules-put-ruleset +func (p *MethodQueryRules) PutRuleset(rulesetid string) *query_rules_put_ruleset.PutRuleset { + _putruleset := query_rules_put_ruleset.NewPutRulesetFunc(p.tp) + return _putruleset(rulesetid) +} + +// Test a query ruleset. +// Evaluate match criteria against a query ruleset to identify the rules that +// would match that criteria. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-query-rules-test +func (p *MethodQueryRules) Test(rulesetid string) *query_rules_test.Test { + _test := query_rules_test.NewTestFunc(p.tp) + return _test(rulesetid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-rollup-delete-job +func (p *MethodRollup) DeleteJob(id string) *rollup_delete_job.DeleteJob { + _deletejob := rollup_delete_job.NewDeleteJobFunc(p.tp) + return _deletejob(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-rollup-get-jobs +func (p *MethodRollup) GetJobs() *rollup_get_jobs.GetJobs { + _getjobs := rollup_get_jobs.NewGetJobsFunc(p.tp) + return _getjobs() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-rollup-get-rollup-caps +func (p *MethodRollup) GetRollupCaps() *rollup_get_rollup_caps.GetRollupCaps { + _getrollupcaps := rollup_get_rollup_caps.NewGetRollupCapsFunc(p.tp) + return _getrollupcaps() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-rollup-get-rollup-index-caps +func (p *MethodRollup) GetRollupIndexCaps(index string) *rollup_get_rollup_index_caps.GetRollupIndexCaps { + _getrollupindexcaps := rollup_get_rollup_index_caps.NewGetRollupIndexCapsFunc(p.tp) + return _getrollupindexcaps(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-rollup-put-job +func (p *MethodRollup) PutJob(id string) *rollup_put_job.PutJob { + _putjob := rollup_put_job.NewPutJobFunc(p.tp) + return _putjob(id) +} + +// 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. +// +// For more detailed examples of using the rollup search API, including querying +// rolled-up data only or combining rolled-up and live data, refer to the +// External documentation. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-rollup-search +func (p *MethodRollup) RollupSearch(index string) *rollup_rollup_search.RollupSearch { + _rollupsearch := rollup_rollup_search.NewRollupSearchFunc(p.tp) + return _rollupsearch(index) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-rollup-start-job +func (p *MethodRollup) StartJob(id string) *rollup_start_job.StartJob { + _startjob := rollup_start_job.NewStartJobFunc(p.tp) + return _startjob(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-rollup-stop-job +func (p *MethodRollup) StopJob(id string) *rollup_stop_job.StopJob { + _stopjob := rollup_stop_job.NewStopJobFunc(p.tp) + return _stopjob(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-search-application-delete +func (p *MethodSearchApplication) Delete(name string) *search_application_delete.Delete { + _delete := search_application_delete.NewDeleteFunc(p.tp) + return _delete(name) +} + +// Delete a behavioral analytics collection. +// The associated data stream is also deleted. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-delete-behavioral-analytics +func (p *MethodSearchApplication) DeleteBehavioralAnalytics(name string) *search_application_delete_behavioral_analytics.DeleteBehavioralAnalytics { + _deletebehavioralanalytics := search_application_delete_behavioral_analytics.NewDeleteBehavioralAnalyticsFunc(p.tp) + return _deletebehavioralanalytics(name) +} + +// Get search application details. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get +func (p *MethodSearchApplication) Get(name string) *search_application_get.Get { + _get := search_application_get.NewGetFunc(p.tp) + return _get(name) +} + +// Get behavioral analytics collections. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics +func (p *MethodSearchApplication) GetBehavioralAnalytics() *search_application_get_behavioral_analytics.GetBehavioralAnalytics { + _getbehavioralanalytics := search_application_get_behavioral_analytics.NewGetBehavioralAnalyticsFunc(p.tp) + return _getbehavioralanalytics() +} + +// Get search applications. +// Get information about search applications. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-get-behavioral-analytics +func (p *MethodSearchApplication) List() *search_application_list.List { + _list := search_application_list.NewListFunc(p.tp) + return _list() +} + +// Create a behavioral analytics collection event. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-post-behavioral-analytics-event +func (p *MethodSearchApplication) PostBehavioralAnalyticsEvent(collectionname, eventtype string) *search_application_post_behavioral_analytics_event.PostBehavioralAnalyticsEvent { + _postbehavioralanalyticsevent := search_application_post_behavioral_analytics_event.NewPostBehavioralAnalyticsEventFunc(p.tp) + return _postbehavioralanalyticsevent(collectionname, eventtype) +} + +// Create or update a search application. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put +func (p *MethodSearchApplication) Put(name string) *search_application_put.Put { + _put := search_application_put.NewPutFunc(p.tp) + return _put(name) +} + +// Create a behavioral analytics collection. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put-behavioral-analytics +func (p *MethodSearchApplication) PutBehavioralAnalytics(name string) *search_application_put_behavioral_analytics.PutBehavioralAnalytics { + _putbehavioralanalytics := search_application_put_behavioral_analytics.NewPutBehavioralAnalyticsFunc(p.tp) + return _putbehavioralanalytics(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-search-application-render-query +func (p *MethodSearchApplication) RenderQuery(name string) *search_application_render_query.RenderQuery { + _renderquery := search_application_render_query.NewRenderQueryFunc(p.tp) + return _renderquery(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-search-application-search +func (p *MethodSearchApplication) Search(name string) *search_application_search.Search { + _search := search_application_search.NewSearchFunc(p.tp) + return _search(name) +} + +// Get cache statistics. +// Get statistics about the shared cache for partially mounted indices. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-cache-stats +func (p *MethodSearchableSnapshots) CacheStats() *searchable_snapshots_cache_stats.CacheStats { + _cachestats := searchable_snapshots_cache_stats.NewCacheStatsFunc(p.tp) + return _cachestats() +} + +// Clear the cache. +// Clear indices and data streams from the shared cache for partially mounted +// indices. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-clear-cache +func (p *MethodSearchableSnapshots) ClearCache() *searchable_snapshots_clear_cache.ClearCache { + _clearcache := searchable_snapshots_clear_cache.NewClearCacheFunc(p.tp) + return _clearcache() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-mount +func (p *MethodSearchableSnapshots) Mount(repository, snapshot string) *searchable_snapshots_mount.Mount { + _mount := searchable_snapshots_mount.NewMountFunc(p.tp) + return _mount(repository, snapshot) +} + +// Get searchable snapshot statistics. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-searchable-snapshots-stats +func (p *MethodSearchableSnapshots) Stats() *searchable_snapshots_stats.Stats { + _stats := searchable_snapshots_stats.NewStatsFunc(p.tp) + return _stats() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-activate-user-profile +func (p *MethodSecurity) ActivateUserProfile() *security_activate_user_profile.ActivateUserProfile { + _activateuserprofile := security_activate_user_profile.NewActivateUserProfileFunc(p.tp) + return _activateuserprofile() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-authenticate +func (p *MethodSecurity) Authenticate() *security_authenticate.Authenticate { + _authenticate := security_authenticate.NewAuthenticateFunc(p.tp) + return _authenticate() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-bulk-delete-role +func (p *MethodSecurity) BulkDeleteRole() *security_bulk_delete_role.BulkDeleteRole { + _bulkdeleterole := security_bulk_delete_role.NewBulkDeleteRoleFunc(p.tp) + return _bulkdeleterole() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-bulk-put-role +func (p *MethodSecurity) BulkPutRole() *security_bulk_put_role.BulkPutRole { + _bulkputrole := security_bulk_put_role.NewBulkPutRoleFunc(p.tp) + return _bulkputrole() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-bulk-update-api-keys +func (p *MethodSecurity) BulkUpdateApiKeys() *security_bulk_update_api_keys.BulkUpdateApiKeys { + _bulkupdateapikeys := security_bulk_update_api_keys.NewBulkUpdateApiKeysFunc(p.tp) + return _bulkupdateapikeys() +} + +// Change passwords. +// +// Change the passwords of users in the native realm and built-in users. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-change-password +func (p *MethodSecurity) ChangePassword() *security_change_password.ChangePassword { + _changepassword := security_change_password.NewChangePasswordFunc(p.tp) + return _changepassword() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-clear-api-key-cache +func (p *MethodSecurity) ClearApiKeyCache(ids string) *security_clear_api_key_cache.ClearApiKeyCache { + _clearapikeycache := security_clear_api_key_cache.NewClearApiKeyCacheFunc(p.tp) + return _clearapikeycache(ids) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-privileges +func (p *MethodSecurity) ClearCachedPrivileges(application string) *security_clear_cached_privileges.ClearCachedPrivileges { + _clearcachedprivileges := security_clear_cached_privileges.NewClearCachedPrivilegesFunc(p.tp) + return _clearcachedprivileges(application) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-realms +func (p *MethodSecurity) ClearCachedRealms(realms string) *security_clear_cached_realms.ClearCachedRealms { + _clearcachedrealms := security_clear_cached_realms.NewClearCachedRealmsFunc(p.tp) + return _clearcachedrealms(realms) +} + +// Clear the roles cache. +// +// Evict roles from the native role cache. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-roles +func (p *MethodSecurity) ClearCachedRoles(name string) *security_clear_cached_roles.ClearCachedRoles { + _clearcachedroles := security_clear_cached_roles.NewClearCachedRolesFunc(p.tp) + return _clearcachedroles(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-clear-cached-service-tokens +func (p *MethodSecurity) ClearCachedServiceTokens(namespace, service, name string) *security_clear_cached_service_tokens.ClearCachedServiceTokens { + _clearcachedservicetokens := security_clear_cached_service_tokens.NewClearCachedServiceTokensFunc(p.tp) + return _clearcachedservicetokens(namespace, service, name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-create-api-key +func (p *MethodSecurity) CreateApiKey() *security_create_api_key.CreateApiKey { + _createapikey := security_create_api_key.NewCreateApiKeyFunc(p.tp) + return _createapikey() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-create-cross-cluster-api-key +func (p *MethodSecurity) CreateCrossClusterApiKey() *security_create_cross_cluster_api_key.CreateCrossClusterApiKey { + _createcrossclusterapikey := security_create_cross_cluster_api_key.NewCreateCrossClusterApiKeyFunc(p.tp) + return _createcrossclusterapikey() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-create-service-token +func (p *MethodSecurity) CreateServiceToken(namespace, service string) *security_create_service_token.CreateServiceToken { + _createservicetoken := security_create_service_token.NewCreateServiceTokenFunc(p.tp) + return _createservicetoken(namespace, service) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-delegate-pki +func (p *MethodSecurity) DelegatePki() *security_delegate_pki.DelegatePki { + _delegatepki := security_delegate_pki.NewDelegatePkiFunc(p.tp) + return _delegatepki() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-delete-privileges +func (p *MethodSecurity) DeletePrivileges(application, name string) *security_delete_privileges.DeletePrivileges { + _deleteprivileges := security_delete_privileges.NewDeletePrivilegesFunc(p.tp) + return _deleteprivileges(application, name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-delete-role +func (p *MethodSecurity) DeleteRole(name string) *security_delete_role.DeleteRole { + _deleterole := security_delete_role.NewDeleteRoleFunc(p.tp) + return _deleterole(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-delete-role-mapping +func (p *MethodSecurity) DeleteRoleMapping(name string) *security_delete_role_mapping.DeleteRoleMapping { + _deleterolemapping := security_delete_role_mapping.NewDeleteRoleMappingFunc(p.tp) + return _deleterolemapping(name) +} + +// Delete service account tokens. +// +// Delete service account tokens for a service in a specified namespace. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-service-token +func (p *MethodSecurity) DeleteServiceToken(namespace, service, name string) *security_delete_service_token.DeleteServiceToken { + _deleteservicetoken := security_delete_service_token.NewDeleteServiceTokenFunc(p.tp) + return _deleteservicetoken(namespace, service, name) +} + +// Delete users. +// +// Delete users from the native realm. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-delete-user +func (p *MethodSecurity) DeleteUser(username string) *security_delete_user.DeleteUser { + _deleteuser := security_delete_user.NewDeleteUserFunc(p.tp) + return _deleteuser(username) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-disable-user +func (p *MethodSecurity) DisableUser(username string) *security_disable_user.DisableUser { + _disableuser := security_disable_user.NewDisableUserFunc(p.tp) + return _disableuser(username) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-disable-user-profile +func (p *MethodSecurity) DisableUserProfile(uid string) *security_disable_user_profile.DisableUserProfile { + _disableuserprofile := security_disable_user_profile.NewDisableUserProfileFunc(p.tp) + return _disableuserprofile(uid) +} + +// Enable users. +// +// Enable users in the native realm. +// By default, when you create users, they are enabled. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-enable-user +func (p *MethodSecurity) EnableUser(username string) *security_enable_user.EnableUser { + _enableuser := security_enable_user.NewEnableUserFunc(p.tp) + return _enableuser(username) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-enable-user-profile +func (p *MethodSecurity) EnableUserProfile(uid string) *security_enable_user_profile.EnableUserProfile { + _enableuserprofile := security_enable_user_profile.NewEnableUserProfileFunc(p.tp) + return _enableuserprofile(uid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-enroll-kibana +func (p *MethodSecurity) EnrollKibana() *security_enroll_kibana.EnrollKibana { + _enrollkibana := security_enroll_kibana.NewEnrollKibanaFunc(p.tp) + return _enrollkibana() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-enroll-node +func (p *MethodSecurity) EnrollNode() *security_enroll_node.EnrollNode { + _enrollnode := security_enroll_node.NewEnrollNodeFunc(p.tp) + return _enrollnode() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-get-api-key +func (p *MethodSecurity) GetApiKey() *security_get_api_key.GetApiKey { + _getapikey := security_get_api_key.NewGetApiKeyFunc(p.tp) + return _getapikey() +} + +// Get builtin privileges. +// +// Get the list of cluster privileges and index privileges that are available in +// this version of Elasticsearch. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-builtin-privileges +func (p *MethodSecurity) GetBuiltinPrivileges() *security_get_builtin_privileges.GetBuiltinPrivileges { + _getbuiltinprivileges := security_get_builtin_privileges.NewGetBuiltinPrivilegesFunc(p.tp) + return _getbuiltinprivileges() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-get-privileges +func (p *MethodSecurity) GetPrivileges() *security_get_privileges.GetPrivileges { + _getprivileges := security_get_privileges.NewGetPrivilegesFunc(p.tp) + return _getprivileges() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-get-role +func (p *MethodSecurity) GetRole() *security_get_role.GetRole { + _getrole := security_get_role.NewGetRoleFunc(p.tp) + return _getrole() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-get-role-mapping +func (p *MethodSecurity) GetRoleMapping() *security_get_role_mapping.GetRoleMapping { + _getrolemapping := security_get_role_mapping.NewGetRoleMappingFunc(p.tp) + return _getrolemapping() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-get-service-accounts +func (p *MethodSecurity) GetServiceAccounts() *security_get_service_accounts.GetServiceAccounts { + _getserviceaccounts := security_get_service_accounts.NewGetServiceAccountsFunc(p.tp) + return _getserviceaccounts() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-get-service-credentials +func (p *MethodSecurity) GetServiceCredentials(namespace, service string) *security_get_service_credentials.GetServiceCredentials { + _getservicecredentials := security_get_service_credentials.NewGetServiceCredentialsFunc(p.tp) + return _getservicecredentials(namespace, service) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-get-settings +func (p *MethodSecurity) GetSettings() *security_get_settings.GetSettings { + _getsettings := security_get_settings.NewGetSettingsFunc(p.tp) + return _getsettings() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-get-token +func (p *MethodSecurity) GetToken() *security_get_token.GetToken { + _gettoken := security_get_token.NewGetTokenFunc(p.tp) + return _gettoken() +} + +// Get users. +// +// Get information about users in the native realm and built-in users. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-get-user +func (p *MethodSecurity) GetUser() *security_get_user.GetUser { + _getuser := security_get_user.NewGetUserFunc(p.tp) + return _getuser() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-get-user-privileges +func (p *MethodSecurity) GetUserPrivileges() *security_get_user_privileges.GetUserPrivileges { + _getuserprivileges := security_get_user_privileges.NewGetUserPrivilegesFunc(p.tp) + return _getuserprivileges() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-get-user-profile +func (p *MethodSecurity) GetUserProfile(uid string) *security_get_user_profile.GetUserProfile { + _getuserprofile := security_get_user_profile.NewGetUserProfileFunc(p.tp) + return _getuserprofile(uid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-grant-api-key +func (p *MethodSecurity) GrantApiKey() *security_grant_api_key.GrantApiKey { + _grantapikey := security_grant_api_key.NewGrantApiKeyFunc(p.tp) + return _grantapikey() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-has-privileges +func (p *MethodSecurity) HasPrivileges() *security_has_privileges.HasPrivileges { + _hasprivileges := security_has_privileges.NewHasPrivilegesFunc(p.tp) + return _hasprivileges() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-has-privileges-user-profile +func (p *MethodSecurity) HasPrivilegesUserProfile() *security_has_privileges_user_profile.HasPrivilegesUserProfile { + _hasprivilegesuserprofile := security_has_privileges_user_profile.NewHasPrivilegesUserProfileFunc(p.tp) + return _hasprivilegesuserprofile() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-invalidate-api-key +func (p *MethodSecurity) InvalidateApiKey() *security_invalidate_api_key.InvalidateApiKey { + _invalidateapikey := security_invalidate_api_key.NewInvalidateApiKeyFunc(p.tp) + return _invalidateapikey() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-invalidate-token +func (p *MethodSecurity) InvalidateToken() *security_invalidate_token.InvalidateToken { + _invalidatetoken := security_invalidate_token.NewInvalidateTokenFunc(p.tp) + return _invalidatetoken() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-oidc-authenticate +func (p *MethodSecurity) OidcAuthenticate() *security_oidc_authenticate.OidcAuthenticate { + _oidcauthenticate := security_oidc_authenticate.NewOidcAuthenticateFunc(p.tp) + return _oidcauthenticate() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-oidc-logout +func (p *MethodSecurity) OidcLogout() *security_oidc_logout.OidcLogout { + _oidclogout := security_oidc_logout.NewOidcLogoutFunc(p.tp) + return _oidclogout() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-oidc-prepare-authentication +func (p *MethodSecurity) OidcPrepareAuthentication() *security_oidc_prepare_authentication.OidcPrepareAuthentication { + _oidcprepareauthentication := security_oidc_prepare_authentication.NewOidcPrepareAuthenticationFunc(p.tp) + return _oidcprepareauthentication() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-put-privileges +func (p *MethodSecurity) PutPrivileges() *security_put_privileges.PutPrivileges { + _putprivileges := security_put_privileges.NewPutPrivilegesFunc(p.tp) + return _putprivileges() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-put-role +func (p *MethodSecurity) PutRole(name string) *security_put_role.PutRole { + _putrole := security_put_role.NewPutRoleFunc(p.tp) + return _putrole(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-put-role-mapping +func (p *MethodSecurity) PutRoleMapping(name string) *security_put_role_mapping.PutRoleMapping { + _putrolemapping := security_put_role_mapping.NewPutRoleMappingFunc(p.tp) + return _putrolemapping(name) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-put-user +func (p *MethodSecurity) PutUser(username string) *security_put_user.PutUser { + _putuser := security_put_user.NewPutUserFunc(p.tp) + return _putuser(username) +} + +// 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. +// Refer to the linked documentation for examples of how to find API keys: +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-api-keys +func (p *MethodSecurity) QueryApiKeys() *security_query_api_keys.QueryApiKeys { + _queryapikeys := security_query_api_keys.NewQueryApiKeysFunc(p.tp) + return _queryapikeys() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-query-role +func (p *MethodSecurity) QueryRole() *security_query_role.QueryRole { + _queryrole := security_query_role.NewQueryRoleFunc(p.tp) + return _queryrole() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-query-user +func (p *MethodSecurity) QueryUser() *security_query_user.QueryUser { + _queryuser := security_query_user.NewQueryUserFunc(p.tp) + return _queryuser() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-saml-authenticate +func (p *MethodSecurity) SamlAuthenticate() *security_saml_authenticate.SamlAuthenticate { + _samlauthenticate := security_saml_authenticate.NewSamlAuthenticateFunc(p.tp) + return _samlauthenticate() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-saml-complete-logout +func (p *MethodSecurity) SamlCompleteLogout() *security_saml_complete_logout.SamlCompleteLogout { + _samlcompletelogout := security_saml_complete_logout.NewSamlCompleteLogoutFunc(p.tp) + return _samlcompletelogout() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-saml-invalidate +func (p *MethodSecurity) SamlInvalidate() *security_saml_invalidate.SamlInvalidate { + _samlinvalidate := security_saml_invalidate.NewSamlInvalidateFunc(p.tp) + return _samlinvalidate() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-saml-logout +func (p *MethodSecurity) SamlLogout() *security_saml_logout.SamlLogout { + _samllogout := security_saml_logout.NewSamlLogoutFunc(p.tp) + return _samllogout() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-saml-prepare-authentication +func (p *MethodSecurity) SamlPrepareAuthentication() *security_saml_prepare_authentication.SamlPrepareAuthentication { + _samlprepareauthentication := security_saml_prepare_authentication.NewSamlPrepareAuthenticationFunc(p.tp) + return _samlprepareauthentication() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-saml-service-provider-metadata +func (p *MethodSecurity) SamlServiceProviderMetadata(realmname string) *security_saml_service_provider_metadata.SamlServiceProviderMetadata { + _samlserviceprovidermetadata := security_saml_service_provider_metadata.NewSamlServiceProviderMetadataFunc(p.tp) + return _samlserviceprovidermetadata(realmname) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-suggest-user-profiles +func (p *MethodSecurity) SuggestUserProfiles() *security_suggest_user_profiles.SuggestUserProfiles { + _suggestuserprofiles := security_suggest_user_profiles.NewSuggestUserProfilesFunc(p.tp) + return _suggestuserprofiles() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-update-api-key +func (p *MethodSecurity) UpdateApiKey(id string) *security_update_api_key.UpdateApiKey { + _updateapikey := security_update_api_key.NewUpdateApiKeyFunc(p.tp) + return _updateapikey(id) +} + +// 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. +// +// To learn more about how to use this API, refer to the [Update cross cluter +// API key API examples +// page](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-cc-api-key-examples). +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-cross-cluster-api-key +func (p *MethodSecurity) UpdateCrossClusterApiKey(id string) *security_update_cross_cluster_api_key.UpdateCrossClusterApiKey { + _updatecrossclusterapikey := security_update_cross_cluster_api_key.NewUpdateCrossClusterApiKeyFunc(p.tp) + return _updatecrossclusterapikey(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-update-settings +func (p *MethodSecurity) UpdateSettings() *security_update_settings.UpdateSettings { + _updatesettings := security_update_settings.NewUpdateSettingsFunc(p.tp) + return _updatesettings() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-security-update-user-profile-data +func (p *MethodSecurity) UpdateUserProfileData(uid string) *security_update_user_profile_data.UpdateUserProfileData { + _updateuserprofiledata := security_update_user_profile_data.NewUpdateUserProfileDataFunc(p.tp) + return _updateuserprofiledata(uid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-shutdown-delete-node +func (p *MethodShutdown) DeleteNode(nodeid string) *shutdown_delete_node.DeleteNode { + _deletenode := shutdown_delete_node.NewDeleteNodeFunc(p.tp) + return _deletenode(nodeid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-shutdown-get-node +func (p *MethodShutdown) GetNode() *shutdown_get_node.GetNode { + _getnode := shutdown_get_node.NewGetNodeFunc(p.tp) + return _getnode() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-shutdown-put-node +func (p *MethodShutdown) PutNode(nodeid string) *shutdown_put_node.PutNode { + _putnode := shutdown_put_node.NewPutNodeFunc(p.tp) + return _putnode(nodeid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-simulate-ingest +func (p *MethodSimulate) Ingest() *simulate_ingest.Ingest { + _ingest := simulate_ingest.NewIngestFunc(p.tp) + return _ingest() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-slm-delete-lifecycle +func (p *MethodSlm) DeleteLifecycle(policyid string) *slm_delete_lifecycle.DeleteLifecycle { + _deletelifecycle := slm_delete_lifecycle.NewDeleteLifecycleFunc(p.tp) + return _deletelifecycle(policyid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-slm-execute-lifecycle +func (p *MethodSlm) ExecuteLifecycle(policyid string) *slm_execute_lifecycle.ExecuteLifecycle { + _executelifecycle := slm_execute_lifecycle.NewExecuteLifecycleFunc(p.tp) + return _executelifecycle(policyid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-slm-execute-retention +func (p *MethodSlm) ExecuteRetention() *slm_execute_retention.ExecuteRetention { + _executeretention := slm_execute_retention.NewExecuteRetentionFunc(p.tp) + return _executeretention() +} + +// Get policy information. +// Get snapshot lifecycle policy definitions and information about the latest +// snapshot attempts. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-lifecycle +func (p *MethodSlm) GetLifecycle() *slm_get_lifecycle.GetLifecycle { + _getlifecycle := slm_get_lifecycle.NewGetLifecycleFunc(p.tp) + return _getlifecycle() +} + +// Get snapshot lifecycle management statistics. +// Get global and policy-level statistics about actions taken by snapshot +// lifecycle management. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-stats +func (p *MethodSlm) GetStats() *slm_get_stats.GetStats { + _getstats := slm_get_stats.NewGetStatsFunc(p.tp) + return _getstats() +} + +// Get the snapshot lifecycle management status. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-slm-get-status +func (p *MethodSlm) GetStatus() *slm_get_status.GetStatus { + _getstatus := slm_get_status.NewGetStatusFunc(p.tp) + return _getstatus() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-slm-put-lifecycle +func (p *MethodSlm) PutLifecycle(policyid string) *slm_put_lifecycle.PutLifecycle { + _putlifecycle := slm_put_lifecycle.NewPutLifecycleFunc(p.tp) + return _putlifecycle(policyid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-slm-start +func (p *MethodSlm) Start() *slm_start.Start { + _start := slm_start.NewStartFunc(p.tp) + return _start() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-slm-stop +func (p *MethodSlm) Stop() *slm_stop.Stop { + _stop := slm_stop.NewStopFunc(p.tp) + return _stop() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-snapshot-cleanup-repository +func (p *MethodSnapshot) CleanupRepository(repository string) *snapshot_cleanup_repository.CleanupRepository { + _cleanuprepository := snapshot_cleanup_repository.NewCleanupRepositoryFunc(p.tp) + return _cleanuprepository(repository) +} + +// Clone a snapshot. +// Clone part of all of a snapshot into another snapshot in the same repository. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-clone +func (p *MethodSnapshot) Clone(repository, snapshot, targetsnapshot string) *snapshot_clone.Clone { + _clone := snapshot_clone.NewCloneFunc(p.tp) + return _clone(repository, snapshot, targetsnapshot) +} + +// Create a snapshot. +// Take a snapshot of a cluster or of data streams and indices. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create +func (p *MethodSnapshot) Create(repository, snapshot string) *snapshot_create.Create { + _create := snapshot_create.NewCreateFunc(p.tp) + return _create(repository, snapshot) +} + +// 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. +// +// Several options for this API can be specified using a query parameter or a +// request body parameter. +// If both parameters are specified, only the query parameter is used. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-create-repository +func (p *MethodSnapshot) CreateRepository(repository string) *snapshot_create_repository.CreateRepository { + _createrepository := snapshot_create_repository.NewCreateRepositoryFunc(p.tp) + return _createrepository(repository) +} + +// Delete snapshots. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-delete +func (p *MethodSnapshot) Delete(repository, snapshot string) *snapshot_delete.Delete { + _delete := snapshot_delete.NewDeleteFunc(p.tp) + return _delete(repository, snapshot) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-snapshot-delete-repository +func (p *MethodSnapshot) DeleteRepository(repository string) *snapshot_delete_repository.DeleteRepository { + _deleterepository := snapshot_delete_repository.NewDeleteRepositoryFunc(p.tp) + return _deleterepository(repository) +} + +// Get snapshot information. +// +// NOTE: The `after` parameter and `next` field enable you to iterate through +// snapshots with some consistency guarantees regarding concurrent creation or +// deletion of snapshots. +// It is guaranteed that any snapshot that exists at the beginning of the +// iteration and is not concurrently deleted will be seen during the iteration. +// Snapshots concurrently created may be seen during an iteration. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get +func (p *MethodSnapshot) Get(repository, snapshot string) *snapshot_get.Get { + _get := snapshot_get.NewGetFunc(p.tp) + return _get(repository, snapshot) +} + +// Get snapshot repository information. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-get-repository +func (p *MethodSnapshot) GetRepository() *snapshot_get_repository.GetRepository { + _getrepository := snapshot_get_repository.NewGetRepositoryFunc(p.tp) + return _getrepository() +} + +// Analyze a snapshot repository. +// +// Performs operations on a snapshot repository in order to check for incorrect +// behaviour. +// +// 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. +// Some repositories may behave correctly when lightly loaded but incorrectly +// under production-like workloads. +// If the first analysis is 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. +// Some repositories may behave correctly when accessed by a small number of +// Elasticsearch nodes but incorrectly when accessed concurrently by a +// production-scale cluster. +// 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. +// Repository analysis triggers conditions that occur only rarely when taking +// snapshots in a production system. +// Snapshotting to unsuitable storage may appear to work correctly most of the +// time despite repository analysis failures. +// However your snapshot data is at risk if you store it in a snapshot +// repository that does not reliably pass repository analysis. +// You can demonstrate that the analysis failure is due to an incompatible +// storage implementation by verifying that Elasticsearch does not detect the +// same problem when analysing the reference implementation of the storage +// protocol you are using. +// For instance, if you are using storage that offers an API which the supplier +// claims to be compatible with AWS S3, verify that repositories in AWS S3 do +// not fail repository analysis. +// This allows you to demonstrate to your storage supplier that a repository +// analysis failure must only be caused by an incompatibility with AWS S3 and +// cannot be attributed to a problem in Elasticsearch. +// Please do not report Elasticsearch issues involving third-party storage +// systems unless you can demonstrate that the same issue exists when analysing +// a repository that uses the reference implementation of the same storage +// protocol. +// 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. +// The response exposes immplementation details of the analysis which may change +// from version to version. +// +// 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/docs/api/doc/elasticsearch/operation/operation-snapshot-repository-analyze +func (p *MethodSnapshot) RepositoryAnalyze(repository string) *snapshot_repository_analyze.RepositoryAnalyze { + _repositoryanalyze := snapshot_repository_analyze.NewRepositoryAnalyzeFunc(p.tp) + return _repositoryanalyze(repository) +} + +// 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. +// +// The default values for the parameters of this API are designed to limit the +// impact of the integrity verification on other activities in your cluster. +// For instance, by default it will only use at most half of the `snapshot_meta` +// threads to verify the integrity of each snapshot, allowing other snapshot +// operations to use the other half of this thread pool. +// If you modify these parameters to speed up the verification process, you risk +// disrupting other snapshot-related operations in your cluster. +// For large repositories, consider setting up a separate single-node +// Elasticsearch cluster just for running the integrity verification API. +// +// 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. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-repository-verify-integrity +func (p *MethodSnapshot) RepositoryVerifyIntegrity(repository string) *snapshot_repository_verify_integrity.RepositoryVerifyIntegrity { + _repositoryverifyintegrity := snapshot_repository_verify_integrity.NewRepositoryVerifyIntegrityFunc(p.tp) + return _repositoryverifyintegrity(repository) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-snapshot-restore +func (p *MethodSnapshot) Restore(repository, snapshot string) *snapshot_restore.Restore { + _restore := snapshot_restore.NewRestoreFunc(p.tp) + return _restore(repository, snapshot) +} + +// 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. +// +// If you omit the `` request path parameter, the request retrieves +// information only for currently running snapshots. +// This usage is preferred. +// If needed, you can specify `` and `` to retrieve +// information for specific snapshots, even if they're not currently running. +// +// 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/docs/api/doc/elasticsearch/operation/operation-snapshot-status +func (p *MethodSnapshot) Status() *snapshot_status.Status { + _status := snapshot_status.NewStatusFunc(p.tp) + return _status() +} + +// Verify a snapshot repository. +// Check for common misconfigurations in a snapshot repository. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-snapshot-verify-repository +func (p *MethodSnapshot) VerifyRepository(repository string) *snapshot_verify_repository.VerifyRepository { + _verifyrepository := snapshot_verify_repository.NewVerifyRepositoryFunc(p.tp) + return _verifyrepository(repository) +} + +// Clear an SQL search cursor. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-clear-cursor +func (p *MethodSql) ClearCursor() *sql_clear_cursor.ClearCursor { + _clearcursor := sql_clear_cursor.NewClearCursorFunc(p.tp) + return _clearcursor() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-sql-delete-async +func (p *MethodSql) DeleteAsync(id string) *sql_delete_async.DeleteAsync { + _deleteasync := sql_delete_async.NewDeleteAsyncFunc(p.tp) + return _deleteasync(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-sql-get-async +func (p *MethodSql) GetAsync(id string) *sql_get_async.GetAsync { + _getasync := sql_get_async.NewGetAsyncFunc(p.tp) + return _getasync(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-sql-get-async-status +func (p *MethodSql) GetAsyncStatus(id string) *sql_get_async_status.GetAsyncStatus { + _getasyncstatus := sql_get_async_status.NewGetAsyncStatusFunc(p.tp) + return _getasyncstatus(id) +} + +// Get SQL search results. +// Run an SQL request. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-sql-query +func (p *MethodSql) Query() *sql_query.Query { + _query := sql_query.NewQueryFunc(p.tp) + return _query() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-sql-translate +func (p *MethodSql) Translate() *sql_translate.Translate { + _translate := sql_translate.NewTranslateFunc(p.tp) + return _translate() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-ssl-certificates +func (p *MethodSsl) Certificates() *ssl_certificates.Certificates { + _certificates := ssl_certificates.NewCertificatesFunc(p.tp) + return _certificates() +} + +// Disable the Logs Streams feature for this cluster +// https://www.elastic.co/guide/en/elasticsearch/reference/current/streams-logs-disable.html +func (p *MethodStreams) LogsDisable() *streams_logs_disable.LogsDisable { + _logsdisable := streams_logs_disable.NewLogsDisableFunc(p.tp) + return _logsdisable() +} + +// Enable the Logs Streams feature for this cluster +// https://www.elastic.co/guide/en/elasticsearch/reference/current/streams-logs-enable.html +func (p *MethodStreams) LogsEnable() *streams_logs_enable.LogsEnable { + _logsenable := streams_logs_enable.NewLogsEnableFunc(p.tp) + return _logsenable() +} + +// 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 (p *MethodStreams) Status() *streams_status.Status { + _status := streams_status.NewStatusFunc(p.tp) + return _status() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym +func (p *MethodSynonyms) DeleteSynonym(id string) *synonyms_delete_synonym.DeleteSynonym { + _deletesynonym := synonyms_delete_synonym.NewDeleteSynonymFunc(p.tp) + return _deletesynonym(id) +} + +// Delete a synonym rule. +// Delete a synonym rule from a synonym set. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-delete-synonym-rule +func (p *MethodSynonyms) DeleteSynonymRule(setid, ruleid string) *synonyms_delete_synonym_rule.DeleteSynonymRule { + _deletesynonymrule := synonyms_delete_synonym_rule.NewDeleteSynonymRuleFunc(p.tp) + return _deletesynonymrule(setid, ruleid) +} + +// Get a synonym set. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym +func (p *MethodSynonyms) GetSynonym(id string) *synonyms_get_synonym.GetSynonym { + _getsynonym := synonyms_get_synonym.NewGetSynonymFunc(p.tp) + return _getsynonym(id) +} + +// Get a synonym rule. +// Get a synonym rule from a synonym set. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym-rule +func (p *MethodSynonyms) GetSynonymRule(setid, ruleid string) *synonyms_get_synonym_rule.GetSynonymRule { + _getsynonymrule := synonyms_get_synonym_rule.NewGetSynonymRuleFunc(p.tp) + return _getsynonymrule(setid, ruleid) +} + +// Get all synonym sets. +// Get a summary of all defined synonym sets. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-get-synonym +func (p *MethodSynonyms) GetSynonymsSets() *synonyms_get_synonyms_sets.GetSynonymsSets { + _getsynonymssets := synonyms_get_synonyms_sets.NewGetSynonymsSetsFunc(p.tp) + return _getsynonymssets() +} + +// 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. +// +// For practical examples of how to create or update a synonyms set, refer to +// the External documentation. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym +func (p *MethodSynonyms) PutSynonym(id string) *synonyms_put_synonym.PutSynonym { + _putsynonym := synonyms_put_synonym.NewPutSynonymFunc(p.tp) + return _putsynonym(id) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym-rule +func (p *MethodSynonyms) PutSynonymRule(setid, ruleid string) *synonyms_put_synonym_rule.PutSynonymRule { + _putsynonymrule := synonyms_put_synonym_rule.NewPutSynonymRuleFunc(p.tp) + return _putsynonymrule(setid, ruleid) +} + +// 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/docs/api/doc/elasticsearch/group/endpoint-tasks +func (p *MethodTasks) Cancel() *tasks_cancel.Cancel { + _cancel := tasks_cancel.NewCancelFunc(p.tp) + return _cancel() +} + +// 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/docs/api/doc/elasticsearch/group/endpoint-tasks +func (p *MethodTasks) Get(taskid string) *tasks_get.Get { + _get := tasks_get.NewGetFunc(p.tp) + return _get(taskid) +} + +// 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/docs/api/doc/elasticsearch/group/endpoint-tasks +func (p *MethodTasks) List() *tasks_list.List { + _list := tasks_list.NewListFunc(p.tp) + return _list() +} + +// 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/docs/api/doc/elasticsearch/group/endpoint-text_structure +func (p *MethodTextStructure) FindFieldStructure() *text_structure_find_field_structure.FindFieldStructure { + _findfieldstructure := text_structure_find_field_structure.NewFindFieldStructureFunc(p.tp) + return _findfieldstructure() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-text-structure-find-message-structure +func (p *MethodTextStructure) FindMessageStructure() *text_structure_find_message_structure.FindMessageStructure { + _findmessagestructure := text_structure_find_message_structure.NewFindMessageStructureFunc(p.tp) + return _findmessagestructure() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-text-structure-find-structure +func (p *MethodTextStructure) FindStructure() *text_structure_find_structure.FindStructure { + _findstructure := text_structure_find_structure.NewFindStructureFunc(p.tp) + return _findstructure() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-text-structure-test-grok-pattern +func (p *MethodTextStructure) TestGrokPattern() *text_structure_test_grok_pattern.TestGrokPattern { + _testgrokpattern := text_structure_test_grok_pattern.NewTestGrokPatternFunc(p.tp) + return _testgrokpattern() +} + +// Delete a transform. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-delete-transform +func (p *MethodTransform) DeleteTransform(transformid string) *transform_delete_transform.DeleteTransform { + _deletetransform := transform_delete_transform.NewDeleteTransformFunc(p.tp) + return _deletetransform(transformid) +} + +// Retrieves transform usage information for transform nodes. +// https://www.elastic.co/guide/en/elasticsearch/reference/current/get-transform-node-stats.html +func (p *MethodTransform) GetNodeStats() *transform_get_node_stats.GetNodeStats { + _getnodestats := transform_get_node_stats.NewGetNodeStatsFunc(p.tp) + return _getnodestats() +} + +// Get transforms. +// Get configuration information for transforms. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform +func (p *MethodTransform) GetTransform() *transform_get_transform.GetTransform { + _gettransform := transform_get_transform.NewGetTransformFunc(p.tp) + return _gettransform() +} + +// Get transform stats. +// +// Get usage information for transforms. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-get-transform-stats +func (p *MethodTransform) GetTransformStats(transformid string) *transform_get_transform_stats.GetTransformStats { + _gettransformstats := transform_get_transform_stats.NewGetTransformStatsFunc(p.tp) + return _gettransformstats(transformid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-transform-preview-transform +func (p *MethodTransform) PreviewTransform() *transform_preview_transform.PreviewTransform { + _previewtransform := transform_preview_transform.NewPreviewTransformFunc(p.tp) + return _previewtransform() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-transform-put-transform +func (p *MethodTransform) PutTransform(transformid string) *transform_put_transform.PutTransform { + _puttransform := transform_put_transform.NewPutTransformFunc(p.tp) + return _puttransform(transformid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-transform-reset-transform +func (p *MethodTransform) ResetTransform(transformid string) *transform_reset_transform.ResetTransform { + _resettransform := transform_reset_transform.NewResetTransformFunc(p.tp) + return _resettransform(transformid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-transform-schedule-now-transform +func (p *MethodTransform) ScheduleNowTransform(transformid string) *transform_schedule_now_transform.ScheduleNowTransform { + _schedulenowtransform := transform_schedule_now_transform.NewScheduleNowTransformFunc(p.tp) + return _schedulenowtransform(transformid) +} + +// 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/docs/api/doc/elasticsearch/operation/operation-transform-start-transform +func (p *MethodTransform) StartTransform(transformid string) *transform_start_transform.StartTransform { + _starttransform := transform_start_transform.NewStartTransformFunc(p.tp) + return _starttransform(transformid) +} + +// Stop transforms. +// Stops one or more transforms. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-transform-stop-transform +func (p *MethodTransform) StopTransform(transformid string) *transform_stop_transform.StopTransform { + _stoptransform := transform_stop_transform.NewStopTransformFunc(p.tp) + return _stoptransform(transformid) +} + +// 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/operation/operation-transform-update-transform +func (p *MethodTransform) UpdateTransform(transformid string) *transform_update_transform.UpdateTransform { + _updatetransform := transform_update_transform.NewUpdateTransformFunc(p.tp) + return _updatetransform(transformid) +} + +// 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/operation/operation-transform-upgrade-transforms +func (p *MethodTransform) UpgradeTransforms() *transform_upgrade_transforms.UpgradeTransforms { + _upgradetransforms := transform_upgrade_transforms.NewUpgradeTransformsFunc(p.tp) + return _upgradetransforms() +} + +// 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). +// To demonstrate how throttling works in practice and how it can be configured +// for individual actions within a watch, refer to External documentation. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch +func (p *MethodWatcher) AckWatch(watchid string) *watcher_ack_watch.AckWatch { + _ackwatch := watcher_ack_watch.NewAckWatchFunc(p.tp) + return _ackwatch(watchid) +} + +// Activate a watch. +// A watch can be either active or inactive. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-activate-watch +func (p *MethodWatcher) ActivateWatch(watchid string) *watcher_activate_watch.ActivateWatch { + _activatewatch := watcher_activate_watch.NewActivateWatchFunc(p.tp) + return _activatewatch(watchid) +} + +// Deactivate a watch. +// A watch can be either active or inactive. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-deactivate-watch +func (p *MethodWatcher) DeactivateWatch(watchid string) *watcher_deactivate_watch.DeactivateWatch { + _deactivatewatch := watcher_deactivate_watch.NewDeactivateWatchFunc(p.tp) + return _deactivatewatch(watchid) +} + +// 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/operation/operation-watcher-delete-watch +func (p *MethodWatcher) DeleteWatch(id string) *watcher_delete_watch.DeleteWatch { + _deletewatch := watcher_delete_watch.NewDeleteWatchFunc(p.tp) + return _deletewatch(id) +} + +// 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. +// Refer to the external documentation for examples of watch execution requests, +// including existing, customized, and inline watches. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch +func (p *MethodWatcher) ExecuteWatch() *watcher_execute_watch.ExecuteWatch { + _executewatch := watcher_execute_watch.NewExecuteWatchFunc(p.tp) + return _executewatch() +} + +// 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/operation/operation-watcher-get-settings +func (p *MethodWatcher) GetSettings() *watcher_get_settings.GetSettings { + _getsettings := watcher_get_settings.NewGetSettingsFunc(p.tp) + return _getsettings() +} + +// Get a watch. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-get-watch +func (p *MethodWatcher) GetWatch(id string) *watcher_get_watch.GetWatch { + _getwatch := watcher_get_watch.NewGetWatchFunc(p.tp) + return _getwatch(id) +} + +// 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/operation/operation-watcher-put-watch +func (p *MethodWatcher) PutWatch(id string) *watcher_put_watch.PutWatch { + _putwatch := watcher_put_watch.NewPutWatchFunc(p.tp) + return _putwatch(id) +} + +// 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/operation/operation-watcher-query-watches +func (p *MethodWatcher) QueryWatches() *watcher_query_watches.QueryWatches { + _querywatches := watcher_query_watches.NewQueryWatchesFunc(p.tp) + return _querywatches() +} + +// Start the watch service. +// Start the Watcher service if it is not already running. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-start +func (p *MethodWatcher) Start() *watcher_start.Start { + _start := watcher_start.NewStartFunc(p.tp) + return _start() +} + +// 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/operation/operation-watcher-stats +func (p *MethodWatcher) Stats() *watcher_stats.Stats { + _stats := watcher_stats.NewStatsFunc(p.tp) + return _stats() +} + +// Stop the watch service. +// Stop the Watcher service if it is running. +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-stop +func (p *MethodWatcher) Stop() *watcher_stop.Stop { + _stop := watcher_stop.NewStopFunc(p.tp) + return _stop() +} + +// 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/operation/operation-watcher-update-settings +func (p *MethodWatcher) UpdateSettings() *watcher_update_settings.UpdateSettings { + _updatesettings := watcher_update_settings.NewUpdateSettingsFunc(p.tp) + return _updatesettings() +} + +// 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/docs/api/doc/elasticsearch/operation/operation-info +func (p *MethodXpack) Info() *xpack_info.Info { + _info := xpack_info.NewInfoFunc(p.tp) + return _info() +} + +// 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/group/endpoint-xpack +func (p *MethodXpack) Usage() *xpack_usage.Usage { + _usage := xpack_usage.NewUsageFunc(p.tp) + return _usage() +} + +func NewMethodAPI(tp elastictransport.Interface) *MethodAPI { + return &MethodAPI{ + tp: tp, + AsyncSearch: MethodAsyncSearch{tp: tp}, + Autoscaling: MethodAutoscaling{tp: tp}, + Capabilities: MethodCapabilities{tp: tp}, + Cat: MethodCat{tp: tp}, + Ccr: MethodCcr{tp: tp}, + Cluster: MethodCluster{tp: tp}, + Connector: MethodConnector{tp: tp}, + Core: MethodCore{tp: tp}, + DanglingIndices: MethodDanglingIndices{tp: tp}, + Enrich: MethodEnrich{tp: tp}, + Eql: MethodEql{tp: tp}, + Esql: MethodEsql{tp: tp}, + Features: MethodFeatures{tp: tp}, + Fleet: MethodFleet{tp: tp}, + Graph: MethodGraph{tp: tp}, + Ilm: MethodIlm{tp: tp}, + Indices: MethodIndices{tp: tp}, + Inference: MethodInference{tp: tp}, + Ingest: MethodIngest{tp: tp}, + License: MethodLicense{tp: tp}, + Logstash: MethodLogstash{tp: tp}, + Migration: MethodMigration{tp: tp}, + Ml: MethodMl{tp: tp}, + Monitoring: MethodMonitoring{tp: tp}, + Nodes: MethodNodes{tp: tp}, + Profiling: MethodProfiling{tp: tp}, + QueryRules: MethodQueryRules{tp: tp}, + Rollup: MethodRollup{tp: tp}, + SearchApplication: MethodSearchApplication{tp: tp}, + SearchableSnapshots: MethodSearchableSnapshots{tp: tp}, + Security: MethodSecurity{tp: tp}, + Shutdown: MethodShutdown{tp: tp}, + Simulate: MethodSimulate{tp: tp}, + Slm: MethodSlm{tp: tp}, + Snapshot: MethodSnapshot{tp: tp}, + Sql: MethodSql{tp: tp}, + Ssl: MethodSsl{tp: tp}, + Streams: MethodStreams{tp: tp}, + Synonyms: MethodSynonyms{tp: tp}, + Tasks: MethodTasks{tp: tp}, + TextStructure: MethodTextStructure{tp: tp}, + Transform: MethodTransform{tp: tp}, + Watcher: MethodWatcher{tp: tp}, + Xpack: MethodXpack{tp: tp}} +} diff --git a/typedapi/asyncsearch/delete/delete.go b/typedapi/asyncsearch/delete/delete.go index 5eda1b23bb..1904e8312d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete an async search. // @@ -335,7 +335,7 @@ func (r *Delete) FilterPath(filterpaths ...string) *Delete { // 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 +// `"exists_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. diff --git a/typedapi/asyncsearch/delete/response.go b/typedapi/asyncsearch/delete/response.go index e9d4228234..9cda299057 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/async_search/delete/AsyncSearchDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/async_search/delete/AsyncSearchDeleteResponse.ts#L22-L25 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 b5cc23e6d9..d18d706b28 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get async search results. // @@ -370,7 +370,7 @@ func (r *Get) FilterPath(filterpaths ...string) *Get { // 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 +// `"exists_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. diff --git a/typedapi/asyncsearch/get/response.go b/typedapi/asyncsearch/get/response.go index 78c6797f46..0d792f30b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package get @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/async_search/get/AsyncSearchGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/async_search/get/AsyncSearchGetResponse.ts#L22-L25 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 ea526e79df..4b0a267a98 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package status @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package status // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/async_search/status/AsyncSearchStatusResponse.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/async_search/status/AsyncSearchStatusResponse.ts#L39-L42 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 573b5b90f1..f3ff3996db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the async search status. // @@ -349,7 +349,7 @@ func (r *Status) FilterPath(filterpaths ...string) *Status { // 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 +// `"exists_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. diff --git a/typedapi/asyncsearch/submit/request.go b/typedapi/asyncsearch/submit/request.go index e2fb234b8c..ddfdced0ae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package submit @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package submit // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/async_search/submit/AsyncSearchSubmitRequest.ts#L54-L294 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bbdbe9eddd..408e6eaab3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package submit @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package submit // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/async_search/submit/AsyncSearchSubmitResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/async_search/submit/AsyncSearchSubmitResponse.ts#L22-L25 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 f25926332f..9687c35cc6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run an async search. // @@ -627,7 +627,7 @@ func (r *Submit) FilterPath(filterpaths ...string) *Submit { // 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 +// `"exists_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. diff --git a/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go b/typedapi/autoscaling/deleteautoscalingpolicy/delete_autoscaling_policy.go index 3be9b9bd76..467ac39d95 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete an autoscaling policy. // @@ -350,7 +350,7 @@ func (r *DeleteAutoscalingPolicy) FilterPath(filterpaths ...string) *DeleteAutos // 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 +// `"exists_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. diff --git a/typedapi/autoscaling/deleteautoscalingpolicy/response.go b/typedapi/autoscaling/deleteautoscalingpolicy/response.go index 8a85b457b4..d737722c1e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleteautoscalingpolicy // Response holds the response body struct for the package deleteautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/delete_autoscaling_policy/DeleteAutoscalingPolicyResponse.ts#L22-L25 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 e554f84707..4362ca50ef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the autoscaling capacity. // @@ -354,7 +354,7 @@ func (r *GetAutoscalingCapacity) FilterPath(filterpaths ...string) *GetAutoscali // 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 +// `"exists_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. diff --git a/typedapi/autoscaling/getautoscalingcapacity/response.go b/typedapi/autoscaling/getautoscalingcapacity/response.go index 716254eaa8..bc2fd2a69c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getautoscalingcapacity @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getautoscalingcapacity // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d97ddf0ce2..3f97e0cca6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get an autoscaling policy. // @@ -341,7 +341,7 @@ func (r *GetAutoscalingPolicy) FilterPath(filterpaths ...string) *GetAutoscaling // 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 +// `"exists_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. diff --git a/typedapi/autoscaling/getautoscalingpolicy/response.go b/typedapi/autoscaling/getautoscalingpolicy/response.go index 1589fbcc43..aa77271b67 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getautoscalingpolicy @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/autoscaling/get_autoscaling_policy/GetAutoscalingPolicyResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/get_autoscaling_policy/GetAutoscalingPolicyResponse.ts#L22-L25 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 bb7b787923..b143641844 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update an autoscaling policy. // @@ -364,7 +364,7 @@ func (r *PutAutoscalingPolicy) FilterPath(filterpaths ...string) *PutAutoscaling // 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 +// `"exists_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. diff --git a/typedapi/autoscaling/putautoscalingpolicy/request.go b/typedapi/autoscaling/putautoscalingpolicy/request.go index 04be23d0e4..ffb0695f6a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putautoscalingpolicy @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyRequest.ts#L25-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 18dbd67e8c..2e79de4857 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putautoscalingpolicy // Response holds the response body struct for the package putautoscalingpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/put_autoscaling_policy/PutAutoscalingPolicyResponse.ts#L22-L25 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 df591f3311..20fd4a3f80 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 b89e7bd0c4..ae2e35ce0f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get aliases. // @@ -414,7 +414,7 @@ func (r *Aliases) FilterPath(filterpaths ...string) *Aliases { // 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 +// `"exists_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. diff --git a/typedapi/cat/aliases/response.go b/typedapi/cat/aliases/response.go index 28707b9b06..495db8f107 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package aliases @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package aliases // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/aliases/CatAliasesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/aliases/CatAliasesResponse.ts#L22-L25 type Response []types.AliasesRecord diff --git a/typedapi/cat/allocation/allocation.go b/typedapi/cat/allocation/allocation.go index 0150363eca..5fbbc120a9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get shard allocation information. // @@ -413,7 +413,7 @@ func (r *Allocation) FilterPath(filterpaths ...string) *Allocation { // 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 +// `"exists_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. diff --git a/typedapi/cat/allocation/response.go b/typedapi/cat/allocation/response.go index 774be64db7..9524228fa8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package allocation @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package allocation // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/allocation/CatAllocationResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/allocation/CatAllocationResponse.ts#L22-L25 type Response []types.AllocationRecord diff --git a/typedapi/cat/componenttemplates/component_templates.go b/typedapi/cat/componenttemplates/component_templates.go index a6f92976f4..73454cf69c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get component templates. // @@ -411,7 +411,7 @@ func (r *ComponentTemplates) FilterPath(filterpaths ...string) *ComponentTemplat // 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 +// `"exists_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. diff --git a/typedapi/cat/componenttemplates/response.go b/typedapi/cat/componenttemplates/response.go index 530e1f9708..405a5b20af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package componenttemplates @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package componenttemplates // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/component_templates/CatComponentTemplatesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/component_templates/CatComponentTemplatesResponse.ts#L22-L25 type Response []types.CatComponentTemplate diff --git a/typedapi/cat/count/count.go b/typedapi/cat/count/count.go index 3712a37128..1687fd5850 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get a document count. // @@ -396,7 +396,7 @@ func (r *Count) FilterPath(filterpaths ...string) *Count { // 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 +// `"exists_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. diff --git a/typedapi/cat/count/response.go b/typedapi/cat/count/response.go index 91a5665b60..c38a8f3c33 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package count @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package count // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/count/CatCountResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/count/CatCountResponse.ts#L22-L25 type Response []types.CountRecord diff --git a/typedapi/cat/fielddata/fielddata.go b/typedapi/cat/fielddata/fielddata.go index 5b102be912..ce711390fd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get field data cache information. // @@ -398,7 +398,7 @@ func (r *Fielddata) FilterPath(filterpaths ...string) *Fielddata { // 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 +// `"exists_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. diff --git a/typedapi/cat/fielddata/response.go b/typedapi/cat/fielddata/response.go index 12a7665430..dd7da1751e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package fielddata @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package fielddata // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/fielddata/CatFielddataResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/fielddata/CatFielddataResponse.ts#L22-L25 type Response []types.FielddataRecord diff --git a/typedapi/cat/health/health.go b/typedapi/cat/health/health.go index 4086c47ed8..5cc9897294 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the cluster health status. // @@ -391,7 +391,7 @@ func (r *Health) FilterPath(filterpaths ...string) *Health { // 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 +// `"exists_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. diff --git a/typedapi/cat/health/response.go b/typedapi/cat/health/response.go index 27679cd3f8..5b1b698df4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package health @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package health // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/health/CatHealthResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/health/CatHealthResponse.ts#L22-L25 type Response []types.HealthRecord diff --git a/typedapi/cat/help/help.go b/typedapi/cat/help/help.go index 680788f096..2419d1a3b1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get CAT help. // diff --git a/typedapi/cat/help/response.go b/typedapi/cat/help/response.go index 7e53be3723..cb41d0486b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package help // Response holds the response body struct for the package help // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/help/CatHelpResponse.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 95575cdb60..e8d2bc7c34 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get index information. // @@ -485,7 +485,7 @@ func (r *Indices) FilterPath(filterpaths ...string) *Indices { // 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 +// `"exists_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. diff --git a/typedapi/cat/indices/response.go b/typedapi/cat/indices/response.go index 3d133abed9..e9eeab15c3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package indices @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package indices // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/indices/CatIndicesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/indices/CatIndicesResponse.ts#L22-L25 type Response []types.IndicesRecord diff --git a/typedapi/cat/master/master.go b/typedapi/cat/master/master.go index 50be598b1d..19253812ce 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get master node information. // @@ -377,7 +377,7 @@ func (r *Master) FilterPath(filterpaths ...string) *Master { // 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 +// `"exists_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. diff --git a/typedapi/cat/master/response.go b/typedapi/cat/master/response.go index a3f98c66ec..d1743ba292 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package master @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package master // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/master/CatMasterResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/master/CatMasterResponse.ts#L22-L25 type Response []types.MasterRecord diff --git a/typedapi/cat/mldatafeeds/ml_datafeeds.go b/typedapi/cat/mldatafeeds/ml_datafeeds.go index 8afad8d185..10636976c2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get datafeeds. // @@ -431,7 +431,7 @@ func (r *MlDatafeeds) FilterPath(filterpaths ...string) *MlDatafeeds { // 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 +// `"exists_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. diff --git a/typedapi/cat/mldatafeeds/response.go b/typedapi/cat/mldatafeeds/response.go index 0f22d638f4..d98e529ba1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package mldatafeeds @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mldatafeeds // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/ml_datafeeds/CatDatafeedsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/ml_datafeeds/CatDatafeedsResponse.ts#L22-L25 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 5d21d1a293..cefbceb0aa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get data frame analytics jobs. // @@ -429,7 +429,7 @@ func (r *MlDataFrameAnalytics) FilterPath(filterpaths ...string) *MlDataFrameAna // 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 +// `"exists_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. diff --git a/typedapi/cat/mldataframeanalytics/response.go b/typedapi/cat/mldataframeanalytics/response.go index 1d230f9dad..38fe27edfa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package mldataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mldataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/ml_data_frame_analytics/CatDataFrameAnalyticsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/ml_data_frame_analytics/CatDataFrameAnalyticsResponse.ts#L22-L25 type Response []types.DataFrameAnalyticsRecord diff --git a/typedapi/cat/mljobs/ml_jobs.go b/typedapi/cat/mljobs/ml_jobs.go index 769f4fc5ae..1eccb4b82f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get anomaly detection jobs. // @@ -440,7 +440,7 @@ func (r *MlJobs) FilterPath(filterpaths ...string) *MlJobs { // 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 +// `"exists_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. diff --git a/typedapi/cat/mljobs/response.go b/typedapi/cat/mljobs/response.go index 448d8407c2..c867b37c1c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package mljobs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mljobs // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/ml_jobs/CatJobsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/ml_jobs/CatJobsResponse.ts#L22-L25 type Response []types.JobsRecord diff --git a/typedapi/cat/mltrainedmodels/ml_trained_models.go b/typedapi/cat/mltrainedmodels/ml_trained_models.go index 1deecacf7f..5a064a542d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get trained models. // @@ -444,7 +444,7 @@ func (r *MlTrainedModels) FilterPath(filterpaths ...string) *MlTrainedModels { // 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 +// `"exists_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. diff --git a/typedapi/cat/mltrainedmodels/response.go b/typedapi/cat/mltrainedmodels/response.go index aae028ea3d..60e83f84ef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package mltrainedmodels @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mltrainedmodels // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/ml_trained_models/CatTrainedModelsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/ml_trained_models/CatTrainedModelsResponse.ts#L22-L25 type Response []types.TrainedModelsRecord diff --git a/typedapi/cat/nodeattrs/nodeattrs.go b/typedapi/cat/nodeattrs/nodeattrs.go index da044caa6e..f7edae0028 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get node attribute information. // @@ -373,7 +373,7 @@ func (r *Nodeattrs) FilterPath(filterpaths ...string) *Nodeattrs { // 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 +// `"exists_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. diff --git a/typedapi/cat/nodeattrs/response.go b/typedapi/cat/nodeattrs/response.go index 84d7acdbda..55c3e84021 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package nodeattrs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package nodeattrs // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/nodeattrs/CatNodeAttributesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/nodeattrs/CatNodeAttributesResponse.ts#L22-L25 type Response []types.NodeAttributesRecord diff --git a/typedapi/cat/nodes/nodes.go b/typedapi/cat/nodes/nodes.go index 3b14f73e95..4fac136389 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get node information. // @@ -40,6 +40,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catnodecolumn" "github.com/elastic/go-elasticsearch/v9/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()) @@ -397,7 +404,7 @@ func (r *Nodes) FilterPath(filterpaths ...string) *Nodes { // 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 +// `"exists_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. diff --git a/typedapi/cat/nodes/response.go b/typedapi/cat/nodes/response.go index e940fb6575..ab9918efaa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package nodes @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package nodes // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/nodes/CatNodesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/nodes/CatNodesResponse.ts#L22-L25 type Response []types.NodesRecord diff --git a/typedapi/cat/pendingtasks/pending_tasks.go b/typedapi/cat/pendingtasks/pending_tasks.go index 4204b3058b..a389de9bc8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get pending task information. // @@ -382,7 +382,7 @@ func (r *PendingTasks) FilterPath(filterpaths ...string) *PendingTasks { // 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 +// `"exists_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. diff --git a/typedapi/cat/pendingtasks/response.go b/typedapi/cat/pendingtasks/response.go index 2b96377890..6e8406d045 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package pendingtasks @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package pendingtasks // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/pending_tasks/CatPendingTasksResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/pending_tasks/CatPendingTasksResponse.ts#L22-L25 type Response []types.PendingTasksRecord diff --git a/typedapi/cat/plugins/plugins.go b/typedapi/cat/plugins/plugins.go index c9f87a9d41..ffd6582766 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get plugin information. // @@ -381,7 +381,7 @@ func (r *Plugins) FilterPath(filterpaths ...string) *Plugins { // 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 +// `"exists_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. diff --git a/typedapi/cat/plugins/response.go b/typedapi/cat/plugins/response.go index 2e94d4a079..44baa3611d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package plugins @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package plugins // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/plugins/CatPluginsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/plugins/CatPluginsResponse.ts#L22-L25 type Response []types.PluginsRecord diff --git a/typedapi/cat/recovery/recovery.go b/typedapi/cat/recovery/recovery.go index 0775aa83dc..28f5c48379 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get shard recovery information. // @@ -46,6 +46,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catrecoverycolumn" "github.com/elastic/go-elasticsearch/v9/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()) @@ -431,7 +438,7 @@ func (r *Recovery) FilterPath(filterpaths ...string) *Recovery { // 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 +// `"exists_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. diff --git a/typedapi/cat/recovery/response.go b/typedapi/cat/recovery/response.go index 003ba76ebb..49ede854ea 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package recovery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package recovery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/recovery/CatRecoveryResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/recovery/CatRecoveryResponse.ts#L22-L25 type Response []types.RecoveryRecord diff --git a/typedapi/cat/repositories/repositories.go b/typedapi/cat/repositories/repositories.go index c085f3d5ac..bb141a22e1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get snapshot repository information. // @@ -373,7 +373,7 @@ func (r *Repositories) FilterPath(filterpaths ...string) *Repositories { // 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 +// `"exists_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. diff --git a/typedapi/cat/repositories/response.go b/typedapi/cat/repositories/response.go index ca8220ccca..41aedf69d9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package repositories @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package repositories // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/repositories/CatRepositoriesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/repositories/CatRepositoriesResponse.ts#L22-L25 type Response []types.RepositoriesRecord diff --git a/typedapi/cat/segments/response.go b/typedapi/cat/segments/response.go index 4f018c135c..ea37b81479 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package segments @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package segments // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/segments/CatSegmentsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/segments/CatSegmentsResponse.ts#L22-L25 type Response []types.SegmentsRecord diff --git a/typedapi/cat/segments/segments.go b/typedapi/cat/segments/segments.go index d9d42ab804..5d9a267cbe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get segment information. // @@ -41,6 +41,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/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 @@ -416,7 +423,7 @@ func (r *Segments) FilterPath(filterpaths ...string) *Segments { // 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 +// `"exists_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. diff --git a/typedapi/cat/shards/response.go b/typedapi/cat/shards/response.go index 7db3d49996..0c00c4dce1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package shards @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package shards // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/shards/CatShardsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/shards/CatShardsResponse.ts#L22-L25 type Response []types.ShardsRecord diff --git a/typedapi/cat/shards/shards.go b/typedapi/cat/shards/shards.go index 24d9e4be5d..bd490d8ad4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get shard information. // @@ -40,6 +40,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/bytes" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catshardcolumn" "github.com/elastic/go-elasticsearch/v9/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()) @@ -412,7 +418,7 @@ func (r *Shards) FilterPath(filterpaths ...string) *Shards { // 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 +// `"exists_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. diff --git a/typedapi/cat/snapshots/response.go b/typedapi/cat/snapshots/response.go index 7511935b7b..5c8be037e5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package snapshots @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package snapshots // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/snapshots/CatSnapshotsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/snapshots/CatSnapshotsResponse.ts#L22-L25 type Response []types.SnapshotsRecord diff --git a/typedapi/cat/snapshots/snapshots.go b/typedapi/cat/snapshots/snapshots.go index 54a5ad37a2..5bb6f0ca74 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get snapshot information. // @@ -40,6 +40,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catsnapshotscolumn" "github.com/elastic/go-elasticsearch/v9/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 } @@ -413,7 +419,7 @@ func (r *Snapshots) FilterPath(filterpaths ...string) *Snapshots { // 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 +// `"exists_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. diff --git a/typedapi/cat/tasks/response.go b/typedapi/cat/tasks/response.go index dbfec57d5f..1f9f06e853 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package tasks @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package tasks // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/tasks/CatTasksResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/tasks/CatTasksResponse.ts#L22-L25 type Response []types.TasksRecord diff --git a/typedapi/cat/tasks/tasks.go b/typedapi/cat/tasks/tasks.go index 1f41b8c5b7..8ed00771e0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get task information. // @@ -421,7 +421,7 @@ func (r *Tasks) FilterPath(filterpaths ...string) *Tasks { // 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 +// `"exists_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. diff --git a/typedapi/cat/templates/response.go b/typedapi/cat/templates/response.go index 077b58561e..ee7ea0d5e4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package templates @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package templates // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/templates/CatTemplatesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/templates/CatTemplatesResponse.ts#L22-L25 type Response []types.TemplatesRecord diff --git a/typedapi/cat/templates/templates.go b/typedapi/cat/templates/templates.go index 777b0dca20..eeb7415b8d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get index template information. // @@ -406,7 +406,7 @@ func (r *Templates) FilterPath(filterpaths ...string) *Templates { // 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 +// `"exists_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. diff --git a/typedapi/cat/threadpool/response.go b/typedapi/cat/threadpool/response.go index 2cf0dfa350..fbfaa5a810 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package threadpool @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package threadpool // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/thread_pool/CatThreadPoolResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/thread_pool/CatThreadPoolResponse.ts#L22-L25 type Response []types.ThreadPoolRecord diff --git a/typedapi/cat/threadpool/thread_pool.go b/typedapi/cat/threadpool/thread_pool.go index 554fab414b..4f963dceac 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get thread pool statistics. // @@ -41,6 +41,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catthreadpoolcolumn" "github.com/elastic/go-elasticsearch/v9/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) @@ -415,7 +421,7 @@ func (r *ThreadPool) FilterPath(filterpaths ...string) *ThreadPool { // 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 +// `"exists_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. diff --git a/typedapi/cat/transforms/response.go b/typedapi/cat/transforms/response.go index 18d0764a86..49686677c5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package transforms @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package transforms // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/transforms/CatTransformsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/transforms/CatTransformsResponse.ts#L22-L25 type Response []types.TransformsRecord diff --git a/typedapi/cat/transforms/transforms.go b/typedapi/cat/transforms/transforms.go index 4e37df4db8..92560bee31 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get transform information. // @@ -434,7 +434,7 @@ func (r *Transforms) FilterPath(filterpaths ...string) *Transforms { // 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 +// `"exists_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. diff --git a/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go b/typedapi/ccr/deleteautofollowpattern/delete_auto_follow_pattern.go index a3b0bd75f3..a16128da78 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete auto-follow patterns. // @@ -338,7 +338,7 @@ func (r *DeleteAutoFollowPattern) FilterPath(filterpaths ...string) *DeleteAutoF // 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 +// `"exists_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. diff --git a/typedapi/ccr/deleteautofollowpattern/response.go b/typedapi/ccr/deleteautofollowpattern/response.go index b632a624cc..2b513ee51c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleteautofollowpattern // Response holds the response body struct for the package deleteautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/delete_auto_follow_pattern/DeleteAutoFollowPatternResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/delete_auto_follow_pattern/DeleteAutoFollowPatternResponse.ts#L22-L25 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 1e7a980be0..73bbff8543 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a follower. // Create a cross-cluster replication follower index that follows a specific @@ -366,7 +366,7 @@ func (r *Follow) FilterPath(filterpaths ...string) *Follow { // 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 +// `"exists_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. diff --git a/typedapi/ccr/follow/request.go b/typedapi/ccr/follow/request.go index f2c6d70ceb..98b7e4c09c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package follow @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package follow // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/follow/CreateFollowIndexRequest.ts#L26-L124 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d7ecdb5c2c..5887ae9e76 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package follow // Response holds the response body struct for the package follow // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/follow/CreateFollowIndexResponse.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0065652423..c6b712371b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get follower information. // @@ -342,7 +342,7 @@ func (r *FollowInfo) FilterPath(filterpaths ...string) *FollowInfo { // 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 +// `"exists_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. diff --git a/typedapi/ccr/followinfo/response.go b/typedapi/ccr/followinfo/response.go index 6f22c553a9..30e186b524 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package followinfo @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package followinfo // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/follow_info/FollowInfoResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ba419316c3..90facdaa79 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get follower stats. // @@ -341,7 +341,7 @@ func (r *FollowStats) FilterPath(filterpaths ...string) *FollowStats { // 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 +// `"exists_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. diff --git a/typedapi/ccr/followstats/response.go b/typedapi/ccr/followstats/response.go index 767b67bb38..38498b5323 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package followstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package followstats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/follow_stats/FollowIndexStatsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b695ca928f..32c395bd13 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Forget a follower. // Remove the cross-cluster replication follower retention leases from the @@ -395,7 +395,7 @@ func (r *ForgetFollower) FilterPath(filterpaths ...string) *ForgetFollower { // 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 +// `"exists_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. diff --git a/typedapi/ccr/forgetfollower/request.go b/typedapi/ccr/forgetfollower/request.go index 76653d2e62..955b3ccdcd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package forgetfollower @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package forgetfollower // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/forget_follower/ForgetFollowerIndexRequest.ts#L24-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ed6b10418d..24a53d2892 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package forgetfollower @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package forgetfollower // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/forget_follower/ForgetFollowerIndexResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 00399de4b5..9c5b108610 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get auto-follow patterns. // @@ -345,7 +345,7 @@ func (r *GetAutoFollowPattern) FilterPath(filterpaths ...string) *GetAutoFollowP // 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 +// `"exists_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. diff --git a/typedapi/ccr/getautofollowpattern/response.go b/typedapi/ccr/getautofollowpattern/response.go index 01a8ca92ff..411e7312db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getautofollowpattern @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/get_auto_follow_pattern/GetAutoFollowPatternResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b450b55ae7..8bb1799bf1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Pause an auto-follow pattern. // @@ -360,7 +360,7 @@ func (r *PauseAutoFollowPattern) FilterPath(filterpaths ...string) *PauseAutoFol // 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 +// `"exists_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. diff --git a/typedapi/ccr/pauseautofollowpattern/response.go b/typedapi/ccr/pauseautofollowpattern/response.go index 37d2e1838e..5e5d1d5b07 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package pauseautofollowpattern // Response holds the response body struct for the package pauseautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/pause_auto_follow_pattern/PauseAutoFollowPatternResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/pause_auto_follow_pattern/PauseAutoFollowPatternResponse.ts#L22-L25 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 e2fb9cb36f..a06460658d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Pause a follower. // @@ -348,7 +348,7 @@ func (r *PauseFollow) FilterPath(filterpaths ...string) *PauseFollow { // 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 +// `"exists_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. diff --git a/typedapi/ccr/pausefollow/response.go b/typedapi/ccr/pausefollow/response.go index d0398ca537..9bbbcd16a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package pausefollow // Response holds the response body struct for the package pausefollow // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/pause_follow/PauseFollowIndexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/pause_follow/PauseFollowIndexResponse.ts#L22-L25 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 cd5e4e4ae3..a9440936cc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update auto-follow patterns. // Create a collection of cross-cluster replication auto-follow patterns for a @@ -367,7 +367,7 @@ func (r *PutAutoFollowPattern) FilterPath(filterpaths ...string) *PutAutoFollowP // 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 +// `"exists_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. diff --git a/typedapi/ccr/putautofollowpattern/request.go b/typedapi/ccr/putautofollowpattern/request.go index 74c8f64c98..4a13a9fbe4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putautofollowpattern @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternRequest.ts#L27-L133 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fe04eaff5a..2a29a88d50 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putautofollowpattern // Response holds the response body struct for the package putautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/put_auto_follow_pattern/PutAutoFollowPatternResponse.ts#L22-L25 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 c6ee7484a2..e2519c6ea1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package resumeautofollowpattern // Response holds the response body struct for the package resumeautofollowpattern // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/resume_auto_follow_pattern/ResumeAutoFollowPatternResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/resume_auto_follow_pattern/ResumeAutoFollowPatternResponse.ts#L22-L25 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 2dbcc49e3d..28bfcf276e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Resume an auto-follow pattern. // @@ -348,7 +348,7 @@ func (r *ResumeAutoFollowPattern) FilterPath(filterpaths ...string) *ResumeAutoF // 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 +// `"exists_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. diff --git a/typedapi/ccr/resumefollow/request.go b/typedapi/ccr/resumefollow/request.go index 0632c19341..81bd135eef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package resumefollow @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package resumefollow // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/resume_follow/ResumeFollowIndexRequest.ts#L25-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 20aae63686..bc70654bc5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package resumefollow // Response holds the response body struct for the package resumefollow // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/resume_follow/ResumeFollowIndexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/resume_follow/ResumeFollowIndexResponse.ts#L22-L25 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 0a007a79b4..c5b8d54b8e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Resume a follower. // Resume a cross-cluster replication follower index that was paused. @@ -357,7 +357,7 @@ func (r *ResumeFollow) FilterPath(filterpaths ...string) *ResumeFollow { // 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 +// `"exists_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. diff --git a/typedapi/ccr/stats/response.go b/typedapi/ccr/stats/response.go index 2b9debf066..9d4d1a6c05 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/stats/CcrStatsResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 576f32b41e..1833c2313c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get cross-cluster replication stats. // @@ -326,7 +326,7 @@ func (r *Stats) FilterPath(filterpaths ...string) *Stats { // 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 +// `"exists_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. diff --git a/typedapi/ccr/unfollow/response.go b/typedapi/ccr/unfollow/response.go index 86c3310e7d..6cc0b73a03 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package unfollow // Response holds the response body struct for the package unfollow // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/unfollow/UnfollowIndexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ccr/unfollow/UnfollowIndexResponse.ts#L22-L25 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 4b27e955bd..7b8c1a32d6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Unfollow an index. // @@ -356,7 +356,7 @@ func (r *Unfollow) FilterPath(filterpaths ...string) *Unfollow { // 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 +// `"exists_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. diff --git a/typedapi/cluster/allocationexplain/allocation_explain.go b/typedapi/cluster/allocationexplain/allocation_explain.go index d839ba18e5..55afa418a1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Explain the shard allocations. // Get explanations for shard allocations in the cluster. @@ -28,6 +28,8 @@ // 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. +// Refer to the linked documentation for examples of how to troubleshoot +// allocation issues using this API. package allocationexplain import ( @@ -92,6 +94,8 @@ func NewAllocationExplainFunc(tp elastictransport.Interface) NewAllocationExplai // 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. +// Refer to the linked documentation for examples of how to troubleshoot +// allocation issues using this API. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-allocation-explain func New(tp elastictransport.Interface) *AllocationExplain { @@ -358,7 +362,7 @@ func (r *AllocationExplain) FilterPath(filterpaths ...string) *AllocationExplain // 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 +// `"exists_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. diff --git a/typedapi/cluster/allocationexplain/request.go b/typedapi/cluster/allocationexplain/request.go index ae1822908e..1d0707d9f2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package allocationexplain @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package allocationexplain // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts#L25-L79 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/allocation_explain/ClusterAllocationExplainRequest.ts#L25-L81 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 3715ff6d24..87a1c38735 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package allocationexplain @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package allocationexplain // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/ClusterAllocationExplainResponse.ts#L32-L64 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2aac8ee078..abf3e4bf8d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete component templates. // Component templates are building blocks for constructing index templates that @@ -346,7 +346,7 @@ func (r *DeleteComponentTemplate) FilterPath(filterpaths ...string) *DeleteCompo // 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 +// `"exists_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. diff --git a/typedapi/cluster/deletecomponenttemplate/response.go b/typedapi/cluster/deletecomponenttemplate/response.go index c55d84ac8b..264ddfd11d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletecomponenttemplate // Response holds the response body struct for the package deletecomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/delete_component_template/ClusterDeleteComponentTemplateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/delete_component_template/ClusterDeleteComponentTemplateResponse.ts#L22-L25 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 7fe5edc1cf..5faa6191ca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clear cluster voting config exclusions. // Remove master-eligible nodes from the voting configuration exclusion list. @@ -272,7 +272,7 @@ func (r *DeleteVotingConfigExclusions) FilterPath(filterpaths ...string) *Delete // 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 +// `"exists_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. diff --git a/typedapi/cluster/existscomponenttemplate/exists_component_template.go b/typedapi/cluster/existscomponenttemplate/exists_component_template.go index 06d219ff55..fef29743b2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Check component templates. // Returns information about whether a particular component template exists. @@ -292,7 +292,7 @@ func (r *ExistsComponentTemplate) FilterPath(filterpaths ...string) *ExistsCompo // 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 +// `"exists_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. diff --git a/typedapi/cluster/getcomponenttemplate/get_component_template.go b/typedapi/cluster/getcomponenttemplate/get_component_template.go index 6b8e34a3aa..b132996dcf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 { @@ -362,7 +375,7 @@ func (r *GetComponentTemplate) FilterPath(filterpaths ...string) *GetComponentTe // 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 +// `"exists_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. diff --git a/typedapi/cluster/getcomponenttemplate/response.go b/typedapi/cluster/getcomponenttemplate/response.go index bf75040b7d..79ea5752cb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getcomponenttemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/get_component_template/ClusterGetComponentTemplateResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f2117d0145..32855214e0 100644 --- a/typedapi/cluster/getsettings/get_settings.go +++ b/typedapi/cluster/getsettings/get_settings.go @@ -16,9 +16,10 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get cluster-wide settings. +// // By default, it returns only settings that have been explicitly defined. package getsettings @@ -70,6 +71,7 @@ func NewGetSettingsFunc(tp elastictransport.Interface) NewGetSettings { } // Get cluster-wide settings. +// // By default, it returns only settings that have been explicitly defined. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-cluster-get-settings @@ -338,7 +340,7 @@ func (r *GetSettings) FilterPath(filterpaths ...string) *GetSettings { // 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 +// `"exists_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. diff --git a/typedapi/cluster/getsettings/response.go b/typedapi/cluster/getsettings/response.go index cde4c8f306..f36d433d51 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getsettings @@ -26,11 +26,15 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/get_settings/ClusterGetSettingsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 46609f5f66..5015af39a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 { @@ -509,7 +474,7 @@ func (r *Health) FilterPath(filterpaths ...string) *Health { // 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 +// `"exists_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. diff --git a/typedapi/cluster/health/response.go b/typedapi/cluster/health/response.go index b8df0ccc43..226fb9eb4e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package health @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package health // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/health/ClusterHealthResponse.ts#L26-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/health/ClusterHealthResponse.ts#L26-L38 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 a6554a9681..0c97c3a3c5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get cluster info. // Returns basic information about the cluster. @@ -324,7 +324,7 @@ func (r *Info) FilterPath(filterpaths ...string) *Info { // 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 +// `"exists_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. diff --git a/typedapi/cluster/info/response.go b/typedapi/cluster/info/response.go index e6ec7de714..229716ce3a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/info/ClusterInfoResponse.ts#L26-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4ccbfc28b8..2cf88879a1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the pending cluster tasks. // Get information about cluster-level changes (such as create index, update @@ -339,7 +339,7 @@ func (r *PendingTasks) FilterPath(filterpaths ...string) *PendingTasks { // 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 +// `"exists_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. diff --git a/typedapi/cluster/pendingtasks/response.go b/typedapi/cluster/pendingtasks/response.go index 17456f01c6..9142db0777 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package pendingtasks @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package pendingtasks // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/pending_tasks/ClusterPendingTasksResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 db57345dd7..6caa60143c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update voting configuration exclusions. // Update the cluster voting config exclusions by node IDs or node names. @@ -363,7 +363,7 @@ func (r *PostVotingConfigExclusions) FilterPath(filterpaths ...string) *PostVoti // 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 +// `"exists_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. diff --git a/typedapi/cluster/putcomponenttemplate/put_component_template.go b/typedapi/cluster/putcomponenttemplate/put_component_template.go index 476a8eef25..f28278df55 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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. @@ -420,7 +428,7 @@ func (r *PutComponentTemplate) FilterPath(filterpaths ...string) *PutComponentTe // 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 +// `"exists_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. diff --git a/typedapi/cluster/putcomponenttemplate/request.go b/typedapi/cluster/putcomponenttemplate/request.go index dafac19122..a21cc2e153 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putcomponenttemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putcomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L105 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 02fc2bc28b..2f35835f65 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putcomponenttemplate // Response holds the response body struct for the package putcomponenttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/put_component_template/ClusterPutComponentTemplateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/put_component_template/ClusterPutComponentTemplateResponse.ts#L22-L25 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 8279038ce3..6e1f0d82aa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the cluster settings. // @@ -402,7 +402,7 @@ func (r *PutSettings) FilterPath(filterpaths ...string) *PutSettings { // 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 +// `"exists_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. @@ -422,6 +422,7 @@ func (r *PutSettings) Pretty(pretty bool) *PutSettings { return r } +// 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 @@ -451,6 +452,7 @@ func (r *PutSettings) AddPersistent(key string, value json.RawMessage) *PutSetti return r } +// 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 diff --git a/typedapi/cluster/putsettings/request.go b/typedapi/cluster/putsettings/request.go index 43dd2ead82..af253e5e28 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putsettings @@ -27,10 +27,13 @@ import ( // Request holds the request body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/put_settings/ClusterPutSettingsRequest.ts#L25-L68 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a59ea87796..120a9f6437 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/put_settings/ClusterPutSettingsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2451c08d0c..4b7f6f5348 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get remote cluster information. // @@ -332,7 +332,7 @@ func (r *RemoteInfo) FilterPath(filterpaths ...string) *RemoteInfo { // 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 +// `"exists_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. diff --git a/typedapi/cluster/remoteinfo/response.go b/typedapi/cluster/remoteinfo/response.go index c9c41b153c..20e3e017e1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package remoteinfo @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package remoteinfo // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f971cb26ce..492033ac50 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package reroute @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package reroute // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/reroute/ClusterRerouteRequest.ts#L25-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d35866ffbd..2982784c41 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Reroute the cluster. // Manually change the allocation of individual shards in the cluster. @@ -426,7 +426,7 @@ func (r *Reroute) FilterPath(filterpaths ...string) *Reroute { // 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 +// `"exists_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. diff --git a/typedapi/cluster/reroute/response.go b/typedapi/cluster/reroute/response.go index 6a355e9db1..f519179d75 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package reroute @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package reroute // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/reroute/ClusterRerouteResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c7fddbc95b..a60a61f537 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package state @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package state // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/state/ClusterStateResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/state/ClusterStateResponse.ts#L22-L31 type Response = json.RawMessage diff --git a/typedapi/cluster/state/state.go b/typedapi/cluster/state/state.go index b8c40b249f..60eee46284 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the cluster state. // Get comprehensive information about the state of the cluster. @@ -496,7 +496,7 @@ func (r *State) FilterPath(filterpaths ...string) *State { // 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 +// `"exists_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. diff --git a/typedapi/cluster/stats/response.go b/typedapi/cluster/stats/response.go index 4da9a9a947..076fc3493c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stats @@ -27,9 +27,11 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/ClusterStatsResponse.ts#L53-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/stats/ClusterStatsResponse.ts#L71-L74 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 cef41fb1ff..f9d127165b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get cluster statistics. // Get basic index metrics (shard numbers, store size, memory usage) and @@ -357,7 +357,7 @@ func (r *Stats) FilterPath(filterpaths ...string) *Stats { // 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 +// `"exists_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. diff --git a/typedapi/connector/checkin/check_in.go b/typedapi/connector/checkin/check_in.go index 675c8fee02..ca7014fce8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Check in a connector. // @@ -329,7 +329,7 @@ func (r *CheckIn) FilterPath(filterpaths ...string) *CheckIn { // 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 +// `"exists_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. diff --git a/typedapi/connector/checkin/response.go b/typedapi/connector/checkin/response.go index 8757756452..1092874baa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package checkin @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package checkin // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/check_in/ConnectorCheckInResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a6a274c585..d781996d6d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a connector. // @@ -350,7 +350,7 @@ func (r *Delete) FilterPath(filterpaths ...string) *Delete { // 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 +// `"exists_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. diff --git a/typedapi/connector/delete/response.go b/typedapi/connector/delete/response.go index acc9fb9688..749748e532 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/delete/ConnectorDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/delete/ConnectorDeleteResponse.ts#L22-L25 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 65d3b00f1e..aad8e974f6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get a connector. // @@ -334,7 +334,7 @@ func (r *Get) FilterPath(filterpaths ...string) *Get { // 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 +// `"exists_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. diff --git a/typedapi/connector/get/response.go b/typedapi/connector/get/response.go index 2ab3f953a2..3253b21dfe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package get @@ -35,7 +35,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/get/ConnectorGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/get/ConnectorGetResponse.ts#L22-L25 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 eae8d5463d..701fd692f8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector last sync stats. // @@ -344,7 +344,7 @@ func (r *LastSync) FilterPath(filterpaths ...string) *LastSync { // 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 +// `"exists_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. diff --git a/typedapi/connector/lastsync/request.go b/typedapi/connector/lastsync/request.go index 1a9cc07f1f..0d8bf15c01 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package lastsync @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package lastsync // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L26-L66 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a11b68dda9..1d62ebae09 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package lastsync @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package lastsync // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/last_sync/ConnectorUpdateLastSyncResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 040a489c97..bd103ee7bc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get all connectors. // @@ -362,7 +362,7 @@ func (r *List) FilterPath(filterpaths ...string) *List { // 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 +// `"exists_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. diff --git a/typedapi/connector/list/response.go b/typedapi/connector/list/response.go index 05677e5209..853620bce5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package list @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package list // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/list/ConnectorListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 04cc5c7d2d..3e8c97e7e4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a connector. // @@ -328,7 +328,7 @@ func (r *Post) FilterPath(filterpaths ...string) *Post { // 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 +// `"exists_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. diff --git a/typedapi/connector/post/request.go b/typedapi/connector/post/request.go index 98bcf9033a..6bcb0853b5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package post @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/post/ConnectorPostRequest.ts#L22-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6c33599ad1..663443b303 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package post @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/post/ConnectorPostResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5b48908fa6..758687f424 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a connector. package put @@ -339,7 +339,7 @@ func (r *Put) FilterPath(filterpaths ...string) *Put { // 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 +// `"exists_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. diff --git a/typedapi/connector/put/request.go b/typedapi/connector/put/request.go index d8d15a3d3c..b27c8287df 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package put @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/put/ConnectorPutRequest.ts#L22-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 24de72533a..3e7b012c44 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package put @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/put/ConnectorPutResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2ca4305b83..661674af0a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Creates a secret for a Connector. package secretpost diff --git a/typedapi/connector/syncjobcancel/response.go b/typedapi/connector/syncjobcancel/response.go index ef7e0fc997..7d0bbbf8f2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjobcancel @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package syncjobcancel // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_cancel/SyncJobCancelResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8c90113fd8..8b06d48a7b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Cancel a connector sync job. // @@ -335,7 +335,7 @@ func (r *SyncJobCancel) FilterPath(filterpaths ...string) *SyncJobCancel { // 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 +// `"exists_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. diff --git a/typedapi/connector/syncjobcheckin/response.go b/typedapi/connector/syncjobcheckin/response.go index da6c0c089a..b4d15380c2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjobcheckin // Response holds the response body struct for the package syncjobcheckin // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_check_in/SyncJobCheckInResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 aeca40106d..bbe82d67af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Check in a connector sync job. // Check in a connector sync job and set the `last_seen` field to the current @@ -339,7 +339,7 @@ func (r *SyncJobCheckIn) FilterPath(filterpaths ...string) *SyncJobCheckIn { // 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 +// `"exists_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. diff --git a/typedapi/connector/syncjobclaim/request.go b/typedapi/connector/syncjobclaim/request.go index 36c6a8945b..c4273f2398 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjobclaim @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package syncjobclaim // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_claim/SyncJobClaimRequest.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 159b885cea..87369f5429 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjobclaim // Response holds the response body struct for the package syncjobclaim // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_claim/SyncJobClaimResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 29a456d354..20e10f0f90 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Claim a connector sync job. // This action updates the job status to `in_progress` and sets the `last_seen` @@ -363,7 +363,7 @@ func (r *SyncJobClaim) FilterPath(filterpaths ...string) *SyncJobClaim { // 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 +// `"exists_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. diff --git a/typedapi/connector/syncjobdelete/response.go b/typedapi/connector/syncjobdelete/response.go index e2737a0af5..077ed7e401 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjobdelete // Response holds the response body struct for the package syncjobdelete // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_delete/SyncJobDeleteResponse.ts#L22-L25 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 f2065b84f4..c6d0e1cdaf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a connector sync job. // @@ -329,7 +329,7 @@ func (r *SyncJobDelete) FilterPath(filterpaths ...string) *SyncJobDelete { // 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 +// `"exists_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. diff --git a/typedapi/connector/syncjoberror/request.go b/typedapi/connector/syncjoberror/request.go index 20171e4b71..8b1dbad69d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjoberror @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package syncjoberror // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_error/SyncJobErrorRequest.ts#L23-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1d71a4c1a5..ab9888a892 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjoberror // Response holds the response body struct for the package syncjoberror // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_error/SyncJobErrorResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0487740d56..c4bab0375d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Set a connector sync job error. // Set the `error` field for a connector sync job and set its `status` to @@ -353,7 +353,7 @@ func (r *SyncJobError) FilterPath(filterpaths ...string) *SyncJobError { // 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 +// `"exists_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. diff --git a/typedapi/connector/syncjobget/response.go b/typedapi/connector/syncjobget/response.go index 082052d731..c3cf27afa7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjobget @@ -36,7 +36,7 @@ import ( // Response holds the response body struct for the package syncjobget // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_get/SyncJobGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/sync_job_get/SyncJobGetResponse.ts#L22-L25 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 f9397d325c..98c333a2c6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get a connector sync job. package syncjobget @@ -323,7 +323,7 @@ func (r *SyncJobGet) FilterPath(filterpaths ...string) *SyncJobGet { // 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 +// `"exists_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. diff --git a/typedapi/connector/syncjoblist/response.go b/typedapi/connector/syncjoblist/response.go index a393ffd0c9..f88a688e75 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjoblist @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package syncjoblist // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_list/SyncJobListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b2f90e862c..d9c40100fd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get all connector sync jobs. // @@ -352,7 +352,7 @@ func (r *SyncJobList) FilterPath(filterpaths ...string) *SyncJobList { // 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 +// `"exists_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. diff --git a/typedapi/connector/syncjobpost/request.go b/typedapi/connector/syncjobpost/request.go index bb99397a1c..b0c4c46f52 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjobpost @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package syncjobpost // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_post/SyncJobPostRequest.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d12b445404..e5b56d5993 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjobpost // Response holds the response body struct for the package syncjobpost // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_post/SyncJobPostResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a027e4f622..4ec7cd2112 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a connector sync job. // @@ -322,7 +322,7 @@ func (r *SyncJobPost) FilterPath(filterpaths ...string) *SyncJobPost { // 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 +// `"exists_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. diff --git a/typedapi/connector/syncjobupdatestats/request.go b/typedapi/connector/syncjobupdatestats/request.go index afceb74889..101f66d0f4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjobupdatestats @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package syncjobupdatestats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_update_stats/SyncJobUpdateStatsRequest.ts#L24-L78 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c662e5cf36..7155cdace8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package syncjobupdatestats // Response holds the response body struct for the package syncjobupdatestats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/sync_job_update_stats/SyncJobUpdateStatsResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 64600dab6f..f7b994ad41 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Set the connector sync job stats. // Stats include: `deleted_document_count`, `indexed_document_count`, @@ -359,7 +359,7 @@ func (r *SyncJobUpdateStats) FilterPath(filterpaths ...string) *SyncJobUpdateSta // 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 +// `"exists_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. diff --git a/typedapi/connector/updateactivefiltering/response.go b/typedapi/connector/updateactivefiltering/response.go index 91e2e16e17..fde104bfb4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateactivefiltering @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateactivefiltering // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a9b4633f8e..2cea1804a5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Activate the connector draft filter. // @@ -335,7 +335,7 @@ func (r *UpdateActiveFiltering) FilterPath(filterpaths ...string) *UpdateActiveF // 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 +// `"exists_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. diff --git a/typedapi/connector/updateapikeyid/request.go b/typedapi/connector/updateapikeyid/request.go index 0ad3522cae..768ce1b1ac 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateapikeyid @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updateapikeyid // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fe4de084d4..f4e73a6fff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateapikeyid @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateapikeyid // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 76622cd087..a1a17bcbc4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector API key ID. // @@ -351,7 +351,7 @@ func (r *UpdateApiKeyId) FilterPath(filterpaths ...string) *UpdateApiKeyId { // 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 +// `"exists_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. diff --git a/typedapi/connector/updateconfiguration/request.go b/typedapi/connector/updateconfiguration/request.go index 5a01b93a73..d07915a3d8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateconfiguration @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package updateconfiguration // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4b39d714ab..689dc869eb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateconfiguration @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateconfiguration // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_configuration/ConnectorUpdateConfigurationResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 da6a0209cd..55af8d0581 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector configuration. // @@ -341,7 +341,7 @@ func (r *UpdateConfiguration) FilterPath(filterpaths ...string) *UpdateConfigura // 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 +// `"exists_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. diff --git a/typedapi/connector/updateerror/request.go b/typedapi/connector/updateerror/request.go index 35e72bab0d..d96d1578d7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateerror @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package updateerror // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 969c0ba0fb..3cb07213d9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateerror @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateerror // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_error/ConnectorUpdateErrorResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1570d9251f..5ef36e0e19 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector error field. // @@ -349,7 +349,7 @@ func (r *UpdateError) FilterPath(filterpaths ...string) *UpdateError { // 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 +// `"exists_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. diff --git a/typedapi/connector/updatefeatures/request.go b/typedapi/connector/updatefeatures/request.go index 78ac039f87..4b5f059d99 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatefeatures @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatefeatures // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_features/ConnectorUpdateFeaturesRequest.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 21aa74de23..4fdaedac5e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatefeatures @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatefeatures // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_features/ConnectorUpdateFeaturesResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2d9cc01ddf..3b424e6c11 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector features. // Update the connector features in the connector document. @@ -367,7 +367,7 @@ func (r *UpdateFeatures) FilterPath(filterpaths ...string) *UpdateFeatures { // 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 +// `"exists_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. diff --git a/typedapi/connector/updatefiltering/request.go b/typedapi/connector/updatefiltering/request.go index 3b2b347424..d3db928423 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatefiltering @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatefiltering // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 21643329fd..561c5a6db7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatefiltering @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatefiltering // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0e680985bb..34e30b8d50 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector filtering. // @@ -351,7 +351,7 @@ func (r *UpdateFiltering) FilterPath(filterpaths ...string) *UpdateFiltering { // 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 +// `"exists_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. diff --git a/typedapi/connector/updatefilteringvalidation/request.go b/typedapi/connector/updatefilteringvalidation/request.go index eec9343ad4..a68ef5c802 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatefilteringvalidation @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatefilteringvalidation // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5abe541cd3..3fa1df7fe1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatefilteringvalidation @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatefilteringvalidation // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e4532afefd..4963c9050d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector draft filtering validation. // @@ -343,7 +343,7 @@ func (r *UpdateFilteringValidation) FilterPath(filterpaths ...string) *UpdateFil // 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 +// `"exists_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. diff --git a/typedapi/connector/updateindexname/request.go b/typedapi/connector/updateindexname/request.go index b18cf541ce..e35af35d59 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateindexname @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package updateindexname // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b054d3b3e6..563f76fad4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateindexname @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateindexname // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_index_name/ConnectorUpdateIndexNameResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fd62354e74..7fceb7bfb1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector index name. // @@ -343,7 +343,7 @@ func (r *UpdateIndexName) FilterPath(filterpaths ...string) *UpdateIndexName { // 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 +// `"exists_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. diff --git a/typedapi/connector/updatename/request.go b/typedapi/connector/updatename/request.go index 47c2596f34..3f25785d96 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatename @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatename // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_name/ConnectorUpdateNameRequest.ts#L22-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 860e565b1e..03bf7732bf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatename @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatename // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_name/ConnectorUpdateNameResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 08848aa7b3..e3f980da9a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector name and description. package updatename @@ -337,7 +337,7 @@ func (r *UpdateName) FilterPath(filterpaths ...string) *UpdateName { // 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 +// `"exists_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. diff --git a/typedapi/connector/updatenative/request.go b/typedapi/connector/updatenative/request.go index 7be61ea09a..cbe1518c66 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatenative @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatenative // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_native/ConnectorUpdateNativeRequest.ts#L22-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7534d4c03a..13b681d42f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatenative @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatenative // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_native/ConnectorUpdateNativeResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7cde094b5f..0b103e66f3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector is_native flag. package updatenative @@ -337,7 +337,7 @@ func (r *UpdateNative) FilterPath(filterpaths ...string) *UpdateNative { // 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 +// `"exists_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. diff --git a/typedapi/connector/updatepipeline/request.go b/typedapi/connector/updatepipeline/request.go index 8f1ebf4fe0..b4a391eab0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatepipeline @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatepipeline // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dc8400198e..c196ee2d29 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatepipeline @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatepipeline // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_pipeline/ConnectorUpdatePipelineResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d8e1302fbf..0259bc725f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector pipeline. // @@ -343,7 +343,7 @@ func (r *UpdatePipeline) FilterPath(filterpaths ...string) *UpdatePipeline { // 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 +// `"exists_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. diff --git a/typedapi/connector/updatescheduling/request.go b/typedapi/connector/updatescheduling/request.go index fe3aaa3b4f..753827f31b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatescheduling @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatescheduling // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8ca0cfa0aa..6c90132dbe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatescheduling @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatescheduling // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 92bb5312f6..4ed713a1ec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector scheduling. package updatescheduling @@ -337,7 +337,7 @@ func (r *UpdateScheduling) FilterPath(filterpaths ...string) *UpdateScheduling { // 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 +// `"exists_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. diff --git a/typedapi/connector/updateservicetype/request.go b/typedapi/connector/updateservicetype/request.go index 320d835bf0..6ec8734b77 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateservicetype @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updateservicetype // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts#L22-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 450f24fbf2..397ca85f5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateservicetype @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updateservicetype // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0b1849dbb6..06a033c637 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector service type. package updateservicetype @@ -337,7 +337,7 @@ func (r *UpdateServiceType) FilterPath(filterpaths ...string) *UpdateServiceType // 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 +// `"exists_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. diff --git a/typedapi/connector/updatestatus/request.go b/typedapi/connector/updatestatus/request.go index 6ca67be6aa..6f1dca7e9c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatestatus @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatestatus // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_status/ConnectorUpdateStatusRequest.ts#L23-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5b537a5204..1b0d3973dc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatestatus @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatestatus // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/update_status/ConnectorUpdateStatusResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a217ac9dba..afe4819dc0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the connector status. package updatestatus @@ -338,7 +338,7 @@ func (r *UpdateStatus) FilterPath(filterpaths ...string) *UpdateStatus { // 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 +// `"exists_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. diff --git a/typedapi/core/bulk/bulk.go b/typedapi/core/bulk/bulk.go index fbbed1a9e4..e23a991f36 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Bulk index or delete documents. // Perform multiple `index`, `create`, `delete`, and `update` actions in a @@ -175,6 +175,11 @@ // 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. +// +// You might want to disable the refresh interval temporarily to improve +// indexing throughput for large bulk requests. +// Refer to the linked documentation for step-by-step instructions using the +// index settings API. package bulk import ( @@ -394,6 +399,11 @@ func NewBulkFunc(tp elastictransport.Interface) NewBulk { // The other two shards that make up the index do not participate in the `_bulk` // request at all. // +// You might want to disable the refresh interval temporarily to improve +// indexing throughput for large bulk requests. +// Refer to the linked documentation for step-by-step instructions using the +// index settings API. +// // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk func New(tp elastictransport.Interface) *Bulk { r := &Bulk{ @@ -780,7 +790,7 @@ func (r *Bulk) FilterPath(filterpaths ...string) *Bulk { // 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 +// `"exists_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. diff --git a/typedapi/core/bulk/request.go b/typedapi/core/bulk/request.go index 33dbcf8cdb..49c8b7d648 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package bulk // Request holds the request body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/bulk/BulkRequest.ts#L32-L247 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/BulkRequest.ts#L32-L251 type Request = []any diff --git a/typedapi/core/bulk/response.go b/typedapi/core/bulk/response.go index f1c9967cee..80c5eee369 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package bulk @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/bulk/BulkResponse.ts#L24-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b6ceb7f30f..7972503efd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 { @@ -354,7 +320,7 @@ func (r *ClearScroll) FilterPath(filterpaths ...string) *ClearScroll { // 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 +// `"exists_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. diff --git a/typedapi/core/clearscroll/request.go b/typedapi/core/clearscroll/request.go index 68fc856067..fa80484ce3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clearscroll @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package clearscroll // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/clear_scroll/ClearScrollRequest.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8ab9831ba0..9f846d3790 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clearscroll // Response holds the response body struct for the package clearscroll // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/clear_scroll/ClearScrollResponse.ts#L22-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 62cde4ad63..13e18918e3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 { @@ -362,7 +328,7 @@ func (r *ClosePointInTime) FilterPath(filterpaths ...string) *ClosePointInTime { // 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 +// `"exists_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. diff --git a/typedapi/core/closepointintime/request.go b/typedapi/core/closepointintime/request.go index dde5a9cc37..14c3b00c54 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package closepointintime @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package closepointintime // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/close_point_in_time/ClosePointInTimeRequest.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ced2bf892a..63e133b1ea 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package closepointintime // Response holds the response body struct for the package closepointintime // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/close_point_in_time/ClosePointInTimeResponse.ts#L22-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 67f7f930ba..42ff6c41ec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Count search results. // Get the number of documents matching a query. @@ -518,7 +518,7 @@ func (r *Count) FilterPath(filterpaths ...string) *Count { // 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 +// `"exists_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. diff --git a/typedapi/core/count/request.go b/typedapi/core/count/request.go index 07fd264604..1cec99c538 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package count @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package count // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/count/CountRequest.ts#L26-L154 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3be1ffa924..c6ce444748 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package count @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package count // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/count/CountResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f006c97d97..5793fb2edf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/optype" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/refresh" "github.com/elastic/go-elasticsearch/v9/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. @@ -759,7 +727,7 @@ func (r *Create) FilterPath(filterpaths ...string) *Create { // 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 +// `"exists_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. diff --git a/typedapi/core/create/request.go b/typedapi/core/create/request.go index afa192f4d8..b3f8d22c2b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package create @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/create/CreateRequest.ts#L35-L221 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8fa61b6391..4b23635c39 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package create @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/create/CreateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/create/CreateResponse.ts#L22-L25 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 6b368ca1e7..7aa52e7300 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 { @@ -565,7 +530,7 @@ func (r *Delete) FilterPath(filterpaths ...string) *Delete { // 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 +// `"exists_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. diff --git a/typedapi/core/delete/response.go b/typedapi/core/delete/response.go index 1095a40f20..2f73f27131 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package delete @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/delete/DeleteResponse.ts#L22-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/delete/DeleteResponse.ts#L22-L35 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 9e4bb911c3..86f52bd415 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete documents. // @@ -876,7 +876,7 @@ func (r *DeleteByQuery) FilterPath(filterpaths ...string) *DeleteByQuery { // 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 +// `"exists_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. diff --git a/typedapi/core/deletebyquery/request.go b/typedapi/core/deletebyquery/request.go index 6c4def95ac..76b724125e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletebyquery @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package deletebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/delete_by_query/DeleteByQueryRequest.ts#L36-L314 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4a526b4967..f209ee408a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletebyquery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deletebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/delete_by_query/DeleteByQueryResponse.ts#L26-L88 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -54,7 +54,7 @@ type Response struct { // `search` is the number of search actions retried. Retries *types.Retries `json:"retries,omitempty"` SliceId *int `json:"slice_id,omitempty"` - Task types.TaskId `json:"task,omitempty"` + Task *string `json:"task,omitempty"` Throttled types.Duration `json:"throttled,omitempty"` // ThrottledMillis The number of milliseconds the request slept to conform to // `requests_per_second`. diff --git a/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go b/typedapi/core/deletebyqueryrethrottle/delete_by_query_rethrottle.go index 2793eeba30..194c76078b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Throttle a delete by query operation. // @@ -344,7 +344,7 @@ func (r *DeleteByQueryRethrottle) FilterPath(filterpaths ...string) *DeleteByQue // 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 +// `"exists_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. diff --git a/typedapi/core/deletebyqueryrethrottle/response.go b/typedapi/core/deletebyqueryrethrottle/response.go index 1c34494f7f..959d582117 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletebyqueryrethrottle @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package deletebyqueryrethrottle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/delete_by_query_rethrottle/DeleteByQueryRethrottleResponse.ts#L22-L25 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 92be7fe7fb..cc7ade9796 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a script or search template. // Deletes a stored script or search template. @@ -345,7 +345,7 @@ func (r *DeleteScript) FilterPath(filterpaths ...string) *DeleteScript { // 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 +// `"exists_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. diff --git a/typedapi/core/deletescript/response.go b/typedapi/core/deletescript/response.go index a15bf571dc..022b6047aa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletescript // Response holds the response body struct for the package deletescript // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/delete_script/DeleteScriptResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/delete_script/DeleteScriptResponse.ts#L22-L25 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 14a34a6dfd..a518b6953f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Check a document. // @@ -440,7 +440,7 @@ func (r *Exists) FilterPath(filterpaths ...string) *Exists { // 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 +// `"exists_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. diff --git a/typedapi/core/existssource/exists_source.go b/typedapi/core/existssource/exists_source.go index 492f18aa3d..dde0a283bf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Check for a document source. // @@ -388,7 +388,7 @@ func (r *ExistsSource) FilterPath(filterpaths ...string) *ExistsSource { // 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 +// `"exists_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. diff --git a/typedapi/core/explain/explain.go b/typedapi/core/explain/explain.go index 4eb34bd252..69c128f05a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Explain a document match result. // Get information about why a specific document matches, or doesn't match, a @@ -480,7 +480,7 @@ func (r *Explain) FilterPath(filterpaths ...string) *Explain { // 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 +// `"exists_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. diff --git a/typedapi/core/explain/request.go b/typedapi/core/explain/request.go index da3e88cf68..28b2784dec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package explain @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package explain // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/explain/ExplainRequest.ts#L26-L125 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 492951b9cc..ffb4e50aa7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package explain @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explain // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/explain/ExplainResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e3b1c8df79..5daf91b764 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the field capabilities. // @@ -431,7 +431,7 @@ func (r *FieldCaps) FilterPath(filterpaths ...string) *FieldCaps { // 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 +// `"exists_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. diff --git a/typedapi/core/fieldcaps/request.go b/typedapi/core/fieldcaps/request.go index 91c39528fe..b8eb2db52d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package fieldcaps @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package fieldcaps // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/field_caps/FieldCapabilitiesRequest.ts#L25-L130 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c0488592d6..d69f7fa7b3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package fieldcaps @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package fieldcaps // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/field_caps/FieldCapabilitiesResponse.ts#L24-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c187f077b2..a275e2993e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 { @@ -502,7 +467,7 @@ func (r *Get) _index(index string) *Get { } // ForceSyntheticSource Indicates whether the request forces synthetic `_source`. -// Use this paramater to test if the mapping supports synthetic `_source` and to +// Use this parameter to test if the mapping supports synthetic `_source` and to // get a sense of the worst case performance. // Fetches with this parameter enabled will be slower than enabling synthetic // source natively in the index. @@ -592,8 +557,8 @@ func (r *Get) SourceIncludes_(fields ...string) *Get { // 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` parameter defaults to `false`. -// Only leaf fields can be retrieved with the `stored_field` option. -// Object fields can't be returned;​if specified, the request fails. +// Only leaf fields can be retrieved with the `stored_fields` option. +// Object fields can't be returned; if specified, the request fails. // API name: stored_fields func (r *Get) StoredFields(fields ...string) *Get { r.values.Set("stored_fields", strings.Join(fields, ",")) @@ -642,7 +607,7 @@ func (r *Get) FilterPath(filterpaths ...string) *Get { // 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 +// `"exists_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. diff --git a/typedapi/core/get/response.go b/typedapi/core/get/response.go index 3043392ea8..e7a441b517 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/get/GetResponse.ts#L23-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/get/GetResponse.ts#L23-L35 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 6916b0acf6..d6b14a44be 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get a script or search template. // Retrieves a stored script or search template. @@ -334,7 +334,7 @@ func (r *GetScript) FilterPath(filterpaths ...string) *GetScript { // 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 +// `"exists_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. diff --git a/typedapi/core/getscript/response.go b/typedapi/core/getscript/response.go index 500f64fb51..670f75e5a7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getscript @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getscript // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/get_script/GetScriptResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1bbeef0103..9375ef20f6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get script contexts. // @@ -302,7 +302,7 @@ func (r *GetScriptContext) FilterPath(filterpaths ...string) *GetScriptContext { // 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 +// `"exists_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. diff --git a/typedapi/core/getscriptcontext/response.go b/typedapi/core/getscriptcontext/response.go index 05c49d3fdf..cb99754461 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getscriptcontext @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getscriptcontext // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/get_script_context/GetScriptContextResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 daa1f9b41b..98cf89037f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get script languages. // @@ -302,7 +302,7 @@ func (r *GetScriptLanguages) FilterPath(filterpaths ...string) *GetScriptLanguag // 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 +// `"exists_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. diff --git a/typedapi/core/getscriptlanguages/response.go b/typedapi/core/getscriptlanguages/response.go index 7d56600c57..b2b0e99a59 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getscriptlanguages @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getscriptlanguages // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/get_script_languages/GetScriptLanguagesResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 79bddf04ca..c4ad5a0493 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 @@ -458,7 +450,7 @@ func (r *GetSource) FilterPath(filterpaths ...string) *GetSource { // 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 +// `"exists_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. diff --git a/typedapi/core/getsource/response.go b/typedapi/core/getsource/response.go index 177facd6c7..3aa5dec8e0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getsource @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsource // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/get_source/SourceResponse.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4fea2caecd..1183b46a7b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the cluster health. // Get a report with the health status of an Elasticsearch cluster. @@ -406,7 +406,7 @@ func (r *HealthReport) FilterPath(filterpaths ...string) *HealthReport { // 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 +// `"exists_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. diff --git a/typedapi/core/healthreport/response.go b/typedapi/core/healthreport/response.go index 78d707df5e..79628d1d5c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package healthreport @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package healthreport // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/Response.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7e8a6df009..7fd88ea560 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 @@ -904,7 +913,7 @@ func (r *Index) FilterPath(filterpaths ...string) *Index { // 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 +// `"exists_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. diff --git a/typedapi/core/index/request.go b/typedapi/core/index/request.go index 6c51bee59e..c75babefbb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package index @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package index // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/index/IndexRequest.ts#L35-L268 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0399b842fe..bd8d433fc2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package index @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package index // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/index/IndexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/index/IndexResponse.ts#L22-L25 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 e7d1cb7b72..e75ee2b467 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/group/endpoint-info func New(tp elastictransport.Interface) *Info { @@ -298,7 +302,7 @@ func (r *Info) FilterPath(filterpaths ...string) *Info { // 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 +// `"exists_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. diff --git a/typedapi/core/info/response.go b/typedapi/core/info/response.go index 57a0869de2..ec98bd1101 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/info/RootNodeInfoResponse.ts#L23-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/info/RootNodeInfoResponse.ts#L23-L40 type Response struct { // ClusterName The responding cluster's name. diff --git a/typedapi/core/mget/mget.go b/typedapi/core/mget/mget.go index aae9592625..64c4c78292 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get multiple documents. // @@ -470,7 +470,7 @@ func (r *Mget) FilterPath(filterpaths ...string) *Mget { // 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 +// `"exists_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. diff --git a/typedapi/core/mget/request.go b/typedapi/core/mget/request.go index 020c5f8605..e77f932123 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package mget @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package mget // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/mget/MultiGetRequest.ts#L25-L127 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a3b19e5510..f95332b14d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package mget @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package mget // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/mget/MultiGetResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 97639f3f70..d2745a8cdc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run multiple searches. // @@ -517,7 +517,7 @@ func (r *Msearch) FilterPath(filterpaths ...string) *Msearch { // 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 +// `"exists_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. diff --git a/typedapi/core/msearch/request.go b/typedapi/core/msearch/request.go index b8fd2014ac..cb7c72c3d4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package msearch @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/msearch/MultiSearchRequest.ts#L25-L136 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch/MultiSearchRequest.ts#L25-L140 type Request = []types.MsearchRequestItem diff --git a/typedapi/core/msearch/response.go b/typedapi/core/msearch/response.go index 1ee52abfc2..7f74b31005 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package msearch @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/msearch/MultiSearchResponse.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch/MultiSearchResponse.ts#L25-L28 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 794efb96fd..3a913014d9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run multiple templated searches. // @@ -429,7 +429,7 @@ func (r *MsearchTemplate) FilterPath(filterpaths ...string) *MsearchTemplate { // 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 +// `"exists_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. diff --git a/typedapi/core/msearchtemplate/request.go b/typedapi/core/msearchtemplate/request.go index 762489e778..b31a418cc2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package msearchtemplate @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package msearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/msearch_template/MultiSearchTemplateRequest.ts#L25-L116 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 56b73a178b..5d71cbd82c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package msearchtemplate @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package msearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch_template/MultiSearchTemplateResponse.ts#L22-L33 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 8239143c8b..8ad642dda6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get multiple term vectors. // @@ -458,7 +458,7 @@ func (r *Mtermvectors) FilterPath(filterpaths ...string) *Mtermvectors { // 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 +// `"exists_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. diff --git a/typedapi/core/mtermvectors/request.go b/typedapi/core/mtermvectors/request.go index aaa663c8c3..70f531d5a0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package mtermvectors @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package mtermvectors // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/mtermvectors/MultiTermVectorsRequest.ts#L31-L134 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 52246d3db2..206c7d3172 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package mtermvectors @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mtermvectors // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/mtermvectors/MultiTermVectorsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f0c3eda0b1..4bd85164f1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -533,7 +532,7 @@ func (r *OpenPointInTime) FilterPath(filterpaths ...string) *OpenPointInTime { // 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 +// `"exists_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. diff --git a/typedapi/core/openpointintime/request.go b/typedapi/core/openpointintime/request.go index 461b7d248f..eac8393852 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package openpointintime @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package openpointintime // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/open_point_in_time/OpenPointInTimeRequest.ts#L26-L127 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a403c413cd..3e0d253d74 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package openpointintime @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package openpointintime // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/open_point_in_time/OpenPointInTimeResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b4239a9e55..1aa770959b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Ping the cluster. // Get information about whether the cluster is running. @@ -247,7 +247,7 @@ func (r *Ping) FilterPath(filterpaths ...string) *Ping { // 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 +// `"exists_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. diff --git a/typedapi/core/putscript/put_script.go b/typedapi/core/putscript/put_script.go index 7dce7ca11d..9106c5a40c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a script or search template. // Creates or updates a stored script or search template. @@ -391,7 +391,7 @@ func (r *PutScript) FilterPath(filterpaths ...string) *PutScript { // 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 +// `"exists_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. diff --git a/typedapi/core/putscript/request.go b/typedapi/core/putscript/request.go index f6daaa356d..7e4277b9d5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putscript @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putscript // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/put_script/PutScriptRequest.ts#L25-L87 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 56842567d8..a164122589 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putscript // Response holds the response body struct for the package putscript // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/put_script/PutScriptResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/put_script/PutScriptResponse.ts#L22-L25 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 46b4b3cecf..3557626bee 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Evaluate ranked search results. // @@ -390,7 +390,7 @@ func (r *RankEval) FilterPath(filterpaths ...string) *RankEval { // 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 +// `"exists_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. diff --git a/typedapi/core/rankeval/request.go b/typedapi/core/rankeval/request.go index 464b9df3ab..c899100c98 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package rankeval @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package rankeval // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/RankEvalRequest.ts#L24-L76 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c6b0370939..7a7f07d843 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package rankeval @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package rankeval // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/RankEvalResponse.ts#L26-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b71f7812d8..b106e0221a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Reindex documents. // @@ -86,219 +86,7 @@ // 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. +// Refer to the linked documentation for examples of how to reindex documents. package reindex import ( @@ -422,219 +210,7 @@ func NewReindexFunc(tp elastictransport.Interface) NewReindex { // 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. +// Refer to the linked documentation for examples of how to reindex documents. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-reindex func New(tp elastictransport.Interface) *Reindex { @@ -961,7 +537,7 @@ func (r *Reindex) FilterPath(filterpaths ...string) *Reindex { // 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 +// `"exists_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. diff --git a/typedapi/core/reindex/request.go b/typedapi/core/reindex/request.go index dd1bdf2f7b..6f82d0dc97 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package reindex @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package reindex // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/reindex/ReindexRequest.ts#L27-L309 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/reindex/ReindexRequest.ts#L27-L178 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 29d32860fe..37e64596e9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package reindex @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reindex // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/reindex/ReindexResponse.ts#L26-L92 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/reindex/ReindexResponse.ts#L26-L92 type Response struct { // Batches The number of scroll responses that were pulled back by the reindex. @@ -52,7 +52,7 @@ type Response struct { // Retries The number of retries attempted by reindex. Retries *types.Retries `json:"retries,omitempty"` SliceId *int `json:"slice_id,omitempty"` - Task types.TaskId `json:"task,omitempty"` + Task *string `json:"task,omitempty"` // ThrottledMillis The number of milliseconds the request slept to conform to // `requests_per_second`. ThrottledMillis *int64 `json:"throttled_millis,omitempty"` diff --git a/typedapi/core/reindexrethrottle/reindex_rethrottle.go b/typedapi/core/reindexrethrottle/reindex_rethrottle.go index 01f8075914..4eb8273248 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Throttle a reindex operation. // @@ -357,7 +357,7 @@ func (r *ReindexRethrottle) FilterPath(filterpaths ...string) *ReindexRethrottle // 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 +// `"exists_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. diff --git a/typedapi/core/reindexrethrottle/response.go b/typedapi/core/reindexrethrottle/response.go index 877e36dbd5..e68cdfe9be 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package reindexrethrottle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reindexrethrottle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/reindex_rethrottle/ReindexRethrottleResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b552b9f622..275b321550 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Render a search template. // @@ -320,7 +320,7 @@ func (r *RenderSearchTemplate) FilterPath(filterpaths ...string) *RenderSearchTe // 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 +// `"exists_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. diff --git a/typedapi/core/rendersearchtemplate/request.go b/typedapi/core/rendersearchtemplate/request.go index 9bde6cb1c8..6277b0609f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package rendersearchtemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package rendersearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/render_search_template/RenderSearchTemplateRequest.ts#L26-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/render_search_template/RenderSearchTemplateRequest.ts#L26-L77 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 c95e6f2509..e71baea20f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package rendersearchtemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package rendersearchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/render_search_template/RenderSearchTemplateResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 76c181d6cc..066f8e44c7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package scriptspainlessexecute @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package scriptspainlessexecute // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/scripts_painless_execute/ExecutePainlessScriptRequest.ts#L24-L64 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 33ddeeaa3b..143666c67a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package scriptspainlessexecute @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package scriptspainlessexecute // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/scripts_painless_execute/ExecutePainlessScriptResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 88145432fd..cc414447d0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run a script. // @@ -341,7 +341,7 @@ func (r *ScriptsPainlessExecute) FilterPath(filterpaths ...string) *ScriptsPainl // 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 +// `"exists_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. diff --git a/typedapi/core/scroll/request.go b/typedapi/core/scroll/request.go index de72fbc0bd..fe8936b5f3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package scroll @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package scroll // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/scroll/ScrollRequest.ts#L24-L88 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f3cda7f2a3..d1c501bc70 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package scroll @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package scroll // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/scroll/ScrollResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/scroll/ScrollResponse.ts#L22-L25 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 d7eed8262f..c190ed676d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run a scrolling search. // @@ -375,7 +375,7 @@ func (r *Scroll) FilterPath(filterpaths ...string) *Scroll { // 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 +// `"exists_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. diff --git a/typedapi/core/search/request.go b/typedapi/core/search/request.go index cf74f8dc22..c22fca598e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package search @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/SearchRequest.ts#L53-L588 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/SearchRequest.ts#L53-L588 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 b952b89f00..12ab062450 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package search @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/SearchResponse.ts#L34-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/SearchResponse.ts#L34-L37 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 8bb9b59ca8..5fb51766ec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run a search. // @@ -555,11 +555,12 @@ func (r *Search) MaxConcurrentShardRequests(maxconcurrentshardrequests int) *Sea // method. // * `_prefer_nodes:,` to if possible, run the search on the // specified nodes IDs. If not, select shards using the default method. -// `_shards:,` to run the search only on the specified shards. You -// can combine this value with other `preference` values. However, the `_shards` -// value must come first. For example: `_shards:2,3|_local`. -// `` (any string that does not start with `_`) to route searches -// with the same `` to the same shards in the same order. +// * `_shards:,` to run the search only on the specified shards. +// You can combine this value with other `preference` values. However, the +// `_shards` value must come first. For example: `_shards:2,3|_local`. +// * `` (any string that does not start with `_`) to route +// searches with the same `` to the same shards in the same +// order. // API name: preference func (r *Search) Preference(preference string) *Search { r.values.Set("preference", preference) @@ -754,7 +755,7 @@ func (r *Search) FilterPath(filterpaths ...string) *Search { // 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 +// `"exists_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. diff --git a/typedapi/core/searchmvt/request.go b/typedapi/core/searchmvt/request.go index ab9cfcbccc..59aaba720c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package searchmvt @@ -35,7 +35,7 @@ import ( // Request holds the request body struct for the package searchmvt // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search_mvt/SearchMvtRequest.ts#L33-L373 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search_mvt/SearchMvtRequest.ts#L33-L334 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 e61ddd23e9..c7d9038188 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package searchmvt // Response holds the response body struct for the package searchmvt // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search_mvt/SearchMvtResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1df1472317..7b925d6fb6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Search a vector tile. // @@ -41,58 +41,6 @@ // 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: @@ -187,6 +135,11 @@ // of tile bins at each zoom level. // Elasticsearch uses the H3 resolution that is closest to the corresponding // geotile density. +// +// Learn how to use the vector tile search API with practical examples in the +// [Vector tile search +// examples](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/vector-tile-search) +// guide. package searchmvt import ( @@ -294,58 +247,6 @@ func NewSearchMvtFunc(tp elastictransport.Interface) NewSearchMvt { // 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: @@ -441,6 +342,11 @@ func NewSearchMvtFunc(tp elastictransport.Interface) NewSearchMvt { // Elasticsearch uses the H3 resolution that is closest to the corresponding // geotile density. // +// Learn how to use the vector tile search API with practical examples in the +// [Vector tile search +// examples](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/vector-tile-search) +// guide. +// // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-mvt func New(tp elastictransport.Interface) *SearchMvt { r := &SearchMvt{ @@ -753,7 +659,7 @@ func (r *SearchMvt) FilterPath(filterpaths ...string) *SearchMvt { // 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 +// `"exists_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. diff --git a/typedapi/core/searchshards/response.go b/typedapi/core/searchshards/response.go index c192ebd951..c16e3479e2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package searchshards @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package searchshards // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search_shards/SearchShardsResponse.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3a525a8ea7..a4e2af56c1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -421,7 +420,7 @@ func (r *SearchShards) FilterPath(filterpaths ...string) *SearchShards { // 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 +// `"exists_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. diff --git a/typedapi/core/searchtemplate/request.go b/typedapi/core/searchtemplate/request.go index 1d71fe84e0..0d0a23e934 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package searchtemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package searchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search_template/SearchTemplateRequest.ts#L33-L154 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search_template/SearchTemplateRequest.ts#L33-L153 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 1683c05e03..ceba19944a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package searchtemplate @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package searchtemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search_template/SearchTemplateResponse.ts#L30-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ffbbd007e9..309b38f6ac 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -454,7 +453,7 @@ func (r *SearchTemplate) FilterPath(filterpaths ...string) *SearchTemplate { // 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 +// `"exists_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. diff --git a/typedapi/core/termsenum/request.go b/typedapi/core/termsenum/request.go index 694fea501f..81713c5d6f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package termsenum @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package termsenum // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/terms_enum/TermsEnumRequest.ts#L26-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 714e82dcfd..e9cc174b34 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package termsenum @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package termsenum // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/terms_enum/TermsEnumResponse.ts#L22-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0f7bfc8692..01a4f2922d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get terms in an index. // @@ -358,7 +358,7 @@ func (r *TermsEnum) FilterPath(filterpaths ...string) *TermsEnum { // 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 +// `"exists_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. diff --git a/typedapi/core/termvectors/request.go b/typedapi/core/termvectors/request.go index f06e1e6680..be39c309e2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package termvectors @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package termvectors // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/termvectors/TermVectorsRequest.ts#L33-L239 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/termvectors/TermVectorsRequest.ts#L33-L241 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 f2f1b67944..5a9c1e9a46 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package termvectors @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package termvectors // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/termvectors/TermVectorsResponse.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fcd12fc306..f7ef507c8e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get term vector information. // @@ -72,6 +72,8 @@ // 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. +// Refer to the linked documentation for detailed examples of how to use this +// API. package termvectors import ( @@ -192,6 +194,8 @@ func NewTermvectorsFunc(tp elastictransport.Interface) NewTermvectors { // 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. +// Refer to the linked documentation for detailed examples of how to use this +// API. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-termvectors func New(tp elastictransport.Interface) *Termvectors { @@ -488,7 +492,7 @@ func (r *Termvectors) FilterPath(filterpaths ...string) *Termvectors { // 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 +// `"exists_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. diff --git a/typedapi/core/update/request.go b/typedapi/core/update/request.go index db17ba625d..b4e29cfe69 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package update @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/update/UpdateRequest.ts#L38-L194 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/update/UpdateRequest.ts#L38-L196 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 af5165bbed..c39ede28bc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package update @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/update/UpdateResponse.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/update/UpdateResponse.ts#L27-L30 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 0f81139fb4..06e86cf95e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update a document. // @@ -43,6 +43,8 @@ // In addition to `_source`, you can access the following variables through the // `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the // current timestamp). +// For usage examples such as partial updates, upserts, and scripted updates, +// see the External documentation. package update import ( @@ -136,6 +138,8 @@ func NewUpdateFunc(tp elastictransport.Interface) NewUpdate { // In addition to `_source`, you can access the following variables through the // `ctx` map: `_index`, `_type`, `_id`, `_version`, `_routing`, and `_now` (the // current timestamp). +// For usage examples such as partial updates, upserts, and scripted updates, +// see the External documentation. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update func New(tp elastictransport.Interface) *Update { @@ -513,7 +517,7 @@ func (r *Update) FilterPath(filterpaths ...string) *Update { // 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 +// `"exists_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. diff --git a/typedapi/core/updatebyquery/request.go b/typedapi/core/updatebyquery/request.go index b154b6cbbd..d6a378991e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatebyquery @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package updatebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/update_by_query/UpdateByQueryRequest.ts#L37-L340 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/update_by_query/UpdateByQueryRequest.ts#L37-L349 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 fc1c5a0ed8..a71e180848 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatebyquery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatebyquery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/update_by_query/UpdateByQueryResponse.ts#L26-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -50,7 +50,7 @@ type Response struct { // `bulk` is the number of bulk actions retried. // `search` is the number of search actions retried. Retries *types.Retries `json:"retries,omitempty"` - Task types.TaskId `json:"task,omitempty"` + Task *string `json:"task,omitempty"` Throttled types.Duration `json:"throttled,omitempty"` // ThrottledMillis The number of milliseconds the request slept to conform to // `requests_per_second`. diff --git a/typedapi/core/updatebyquery/update_by_query.go b/typedapi/core/updatebyquery/update_by_query.go index 0f1fd2c9f5..132fb05ca0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update documents. // Updates documents that match the specified query. @@ -60,6 +60,40 @@ // Any update requests that completed successfully still stick, they are not // rolled back. // +// **Refreshing shards** +// +// Specifying the `refresh` parameter refreshes all shards once the request +// completes. +// This is different to the update API's `refresh` parameter, which causes only +// the shard +// that received the request to be refreshed. Unlike the update API, it does not +// support +// `wait_for`. +// +// **Running update by query asynchronously** +// +// If the request contains `wait_for_completion=false`, Elasticsearch +// performs some preflight checks, launches the request, and returns a +// [task](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks) +// you can use to cancel or get the status of the task. +// Elasticsearch creates a record of this task as a document at +// `.tasks/task/${taskId}`. +// +// **Waiting for active shards** +// +// `wait_for_active_shards` controls how many copies of a shard must be active +// before proceeding with the request. See +// [`wait_for_active_shards`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards) +// for details. `timeout` controls how long each write request waits for +// unavailable +// shards to become available. Both work exactly the way they work in the +// [Bulk +// API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk). +// Update by query uses scrolled searches, so you can also +// specify the `scroll` parameter to control how long it keeps the search +// context +// alive, for example `?scroll=10m`. The default is 5 minutes. +// // **Throttling update requests** // // To control the rate at which update by query issues batches of update @@ -133,28 +167,8 @@ // // 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. +// Refer to the linked documentation for examples of how to update documents +// using the `_update_by_query` API: package updatebyquery import ( @@ -263,6 +277,40 @@ func NewUpdateByQueryFunc(tp elastictransport.Interface) NewUpdateByQuery { // Any update requests that completed successfully still stick, they are not // rolled back. // +// **Refreshing shards** +// +// Specifying the `refresh` parameter refreshes all shards once the request +// completes. +// This is different to the update API's `refresh` parameter, which causes only +// the shard +// that received the request to be refreshed. Unlike the update API, it does not +// support +// `wait_for`. +// +// **Running update by query asynchronously** +// +// If the request contains `wait_for_completion=false`, Elasticsearch +// performs some preflight checks, launches the request, and returns a +// [task](https://www.elastic.co/docs/api/doc/elasticsearch/group/endpoint-tasks) +// you can use to cancel or get the status of the task. +// Elasticsearch creates a record of this task as a document at +// `.tasks/task/${taskId}`. +// +// **Waiting for active shards** +// +// `wait_for_active_shards` controls how many copies of a shard must be active +// before proceeding with the request. See +// [`wait_for_active_shards`](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-create#operation-create-wait_for_active_shards) +// for details. `timeout` controls how long each write request waits for +// unavailable +// shards to become available. Both work exactly the way they work in the +// [Bulk +// API](https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk). +// Update by query uses scrolled searches, so you can also +// specify the `scroll` parameter to control how long it keeps the search +// context +// alive, for example `?scroll=10m`. The default is 5 minutes. +// // **Throttling update requests** // // To control the rate at which update by query issues batches of update @@ -336,28 +384,8 @@ func NewUpdateByQueryFunc(tp elastictransport.Interface) NewUpdateByQuery { // // 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. +// Refer to the linked documentation for examples of how to update documents +// using the `_update_by_query` API: // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-update-by-query func New(tp elastictransport.Interface) *UpdateByQuery { @@ -647,7 +675,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{} @@ -914,7 +941,7 @@ func (r *UpdateByQuery) FilterPath(filterpaths ...string) *UpdateByQuery { // 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 +// `"exists_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. diff --git a/typedapi/core/updatebyqueryrethrottle/response.go b/typedapi/core/updatebyqueryrethrottle/response.go index 3cf17d8962..c2bf9ddfa8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatebyqueryrethrottle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatebyqueryrethrottle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 222ac14114..df381bbe7b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Throttle an update by query operation. // @@ -344,7 +344,7 @@ func (r *UpdateByQueryRethrottle) FilterPath(filterpaths ...string) *UpdateByQue // 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 +// `"exists_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. diff --git a/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go b/typedapi/danglingindices/deletedanglingindex/delete_dangling_index.go index 9b809b00fb..3c0ec581a7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a dangling index. // If Elasticsearch encounters index data that is absent from the current @@ -357,7 +357,7 @@ func (r *DeleteDanglingIndex) FilterPath(filterpaths ...string) *DeleteDanglingI // 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 +// `"exists_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. diff --git a/typedapi/danglingindices/deletedanglingindex/response.go b/typedapi/danglingindices/deletedanglingindex/response.go index 9d5aaf86d9..4ef1919ec1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletedanglingindex // Response holds the response body struct for the package deletedanglingindex // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/dangling_indices/delete_dangling_index/DeleteDanglingIndexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/dangling_indices/delete_dangling_index/DeleteDanglingIndexResponse.ts#L22-L25 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 75805f5471..2e8b6f0165 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Import a dangling index. // @@ -362,7 +362,7 @@ func (r *ImportDanglingIndex) FilterPath(filterpaths ...string) *ImportDanglingI // 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 +// `"exists_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. diff --git a/typedapi/danglingindices/importdanglingindex/response.go b/typedapi/danglingindices/importdanglingindex/response.go index dfa2d20d89..0825ad9593 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package importdanglingindex // Response holds the response body struct for the package importdanglingindex // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/dangling_indices/import_dangling_index/ImportDanglingIndexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/dangling_indices/import_dangling_index/ImportDanglingIndexResponse.ts#L22-L25 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 3261aa1b7f..1a8d732450 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the dangling indices. // @@ -314,7 +314,7 @@ func (r *ListDanglingIndices) FilterPath(filterpaths ...string) *ListDanglingInd // 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 +// `"exists_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. diff --git a/typedapi/danglingindices/listdanglingindices/response.go b/typedapi/danglingindices/listdanglingindices/response.go index 14052be97b..5644daa1e4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package listdanglingindices @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package listdanglingindices // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 12e6fbbf30..9d9b9d512c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete an enrich policy. // Deletes an existing enrich policy and its enrich index. @@ -333,7 +333,7 @@ func (r *DeletePolicy) FilterPath(filterpaths ...string) *DeletePolicy { // 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 +// `"exists_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. diff --git a/typedapi/enrich/deletepolicy/response.go b/typedapi/enrich/deletepolicy/response.go index 9061787495..8af6f84606 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletepolicy // Response holds the response body struct for the package deletepolicy // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/delete_policy/DeleteEnrichPolicyResponse.ts#L22-L25 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 8b368f8d7d..fac69a2c40 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run an enrich policy. // Create the enrich index for an existing enrich policy. @@ -344,7 +344,7 @@ func (r *ExecutePolicy) FilterPath(filterpaths ...string) *ExecutePolicy { // 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 +// `"exists_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. diff --git a/typedapi/enrich/executepolicy/response.go b/typedapi/enrich/executepolicy/response.go index 8b1b0da424..924deea5e4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package executepolicy @@ -26,10 +26,10 @@ import ( // Response holds the response body struct for the package executepolicy // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/execute_policy/ExecuteEnrichPolicyResponse.ts#L23-L28 type Response struct { Status *types.ExecuteEnrichPolicyStatus `json:"status,omitempty"` - Task types.TaskId `json:"task,omitempty"` + Task *string `json:"task,omitempty"` } // NewResponse returns a Response diff --git a/typedapi/enrich/getpolicy/get_policy.go b/typedapi/enrich/getpolicy/get_policy.go index 1d20862695..a5184dc7b9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get an enrich policy. // Returns information about an enrich policy. @@ -339,7 +339,7 @@ func (r *GetPolicy) FilterPath(filterpaths ...string) *GetPolicy { // 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 +// `"exists_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. diff --git a/typedapi/enrich/getpolicy/response.go b/typedapi/enrich/getpolicy/response.go index a9fb4a28a3..5a658d69ff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getpolicy @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/get_policy/GetEnrichPolicyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5df4d1d469..6434bad360 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create an enrich policy. // Creates an enrich policy. @@ -347,7 +347,7 @@ func (r *PutPolicy) FilterPath(filterpaths ...string) *PutPolicy { // 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 +// `"exists_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. diff --git a/typedapi/enrich/putpolicy/request.go b/typedapi/enrich/putpolicy/request.go index f000a39ae2..8e7b93b7ae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putpolicy @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/put_policy/PutEnrichPolicyRequest.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 04365d96cd..5dc2368317 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putpolicy // Response holds the response body struct for the package putpolicy // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/put_policy/PutEnrichPolicyResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/put_policy/PutEnrichPolicyResponse.ts#L22-L25 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 b221d6a62e..82fa737760 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/stats/EnrichStatsResponse.ts#L22-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b4a2c9717d..04033c2182 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get enrich stats. // Returns enrich coordinator statistics and information about enrich policies @@ -312,7 +312,7 @@ func (r *Stats) FilterPath(filterpaths ...string) *Stats { // 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 +// `"exists_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. diff --git a/typedapi/eql/delete/delete.go b/typedapi/eql/delete/delete.go index e3effa02da..5a4aa61111 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete an async EQL search. // Delete an async EQL search or a stored synchronous EQL search. @@ -330,7 +330,7 @@ func (r *Delete) FilterPath(filterpaths ...string) *Delete { // 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 +// `"exists_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. diff --git a/typedapi/eql/delete/response.go b/typedapi/eql/delete/response.go index 70f4398b52..277868ffbf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/eql/delete/EqlDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/eql/delete/EqlDeleteResponse.ts#L22-L25 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 6f47b047c4..f69e975d29 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get async EQL search results. // Get the current status and available results for an async EQL search or a @@ -346,7 +346,7 @@ func (r *Get) FilterPath(filterpaths ...string) *Get { // 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 +// `"exists_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. diff --git a/typedapi/eql/get/response.go b/typedapi/eql/get/response.go index e0ffea2ee7..2ac4d159de 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/eql/get/EqlGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/eql/get/EqlGetResponse.ts#L22-L25 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 2459d42012..af1be62757 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the async EQL status. // Get the current status for an async EQL search or a stored synchronous EQL @@ -329,7 +329,7 @@ func (r *GetStatus) FilterPath(filterpaths ...string) *GetStatus { // 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 +// `"exists_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. diff --git a/typedapi/eql/getstatus/response.go b/typedapi/eql/getstatus/response.go index 9733eb5e70..a5ad629275 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getstatus // Response holds the response body struct for the package getstatus // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/eql/get_status/EqlGetStatusResponse.ts#L24-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 aeabf6b539..77702d3f7f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package search @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/eql/search/EqlSearchRequest.ts#L28-L161 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a827ca8890..0dbb80343e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package search @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/eql/search/EqlSearchResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/eql/search/EqlSearchResponse.ts#L22-L25 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 c49be57216..08950ab82f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 { @@ -369,7 +382,7 @@ func (r *Search) FilterPath(filterpaths ...string) *Search { // 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 +// `"exists_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. diff --git a/typedapi/esdsl/access.go b/typedapi/esdsl/access.go index 2dbb199f6b..d1b6d867ce 100644 --- a/typedapi/esdsl/access.go +++ b/typedapi/esdsl/access.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/acknowledgestate.go b/typedapi/esdsl/acknowledgestate.go index 7784404b73..9fd3735016 100644 --- a/typedapi/esdsl/acknowledgestate.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/actionstatus.go b/typedapi/esdsl/actionstatus.go index 1a6171bbda..3ef84b81e7 100644 --- a/typedapi/esdsl/actionstatus.go +++ b/typedapi/esdsl/actionstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/activationstate.go b/typedapi/esdsl/activationstate.go index e7129ef13b..70deef366e 100644 --- a/typedapi/esdsl/activationstate.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/adaptiveallocations.go b/typedapi/esdsl/adaptiveallocations.go index abc9844583..38c4001670 100644 --- a/typedapi/esdsl/adaptiveallocations.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/adaptiveallocationssettings.go b/typedapi/esdsl/adaptiveallocationssettings.go index 8228595a50..edd0a2d761 100644 --- a/typedapi/esdsl/adaptiveallocationssettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/addaction.go b/typedapi/esdsl/addaction.go index 8f09fa32c1..5f4e84a01f 100644 --- a/typedapi/esdsl/addaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/adjacencymatrixaggregation.go b/typedapi/esdsl/adjacencymatrixaggregation.go index b4d1bdf1d7..abb9d5ac4d 100644 --- a/typedapi/esdsl/adjacencymatrixaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/aggregatemetricdoubleproperty.go b/typedapi/esdsl/aggregatemetricdoubleproperty.go index 8b706d8375..1ef5786204 100644 --- a/typedapi/esdsl/aggregatemetricdoubleproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -82,6 +82,13 @@ func (s *_aggregateMetricDoubleProperty) IgnoreAbove(ignoreabove int) *_aggregat return s } +func (s *_aggregateMetricDoubleProperty) IgnoreMalformed(ignoremalformed bool) *_aggregateMetricDoubleProperty { + + s.v.IgnoreMalformed = &ignoremalformed + + return s +} + func (s *_aggregateMetricDoubleProperty) Meta(meta map[string]string) *_aggregateMetricDoubleProperty { s.v.Meta = meta diff --git a/typedapi/esdsl/aggregateorder.go b/typedapi/esdsl/aggregateorder.go index 55eaed1547..7268c57f22 100644 --- a/typedapi/esdsl/aggregateorder.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/aggregateoutput.go b/typedapi/esdsl/aggregateoutput.go index 8f55dce0b2..342746e945 100644 --- a/typedapi/esdsl/aggregateoutput.go +++ b/typedapi/esdsl/aggregateoutput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/aggregationrange.go b/typedapi/esdsl/aggregationrange.go index 0d370f2ced..0700d7a198 100644 --- a/typedapi/esdsl/aggregationrange.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/aggregations.go b/typedapi/esdsl/aggregations.go index 759f8f076e..214d142980 100644 --- a/typedapi/esdsl/aggregations.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/alias.go b/typedapi/esdsl/alias.go index a24a21bb50..3b743a5abc 100644 --- a/typedapi/esdsl/alias.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/aliasdefinition.go b/typedapi/esdsl/aliasdefinition.go index f2873cbd04..0973cb7d84 100644 --- a/typedapi/esdsl/aliasdefinition.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/alibabacloudservicesettings.go b/typedapi/esdsl/alibabacloudservicesettings.go index 27aa16d336..7e9ee5b955 100644 --- a/typedapi/esdsl/alibabacloudservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/alibabacloudtasksettings.go b/typedapi/esdsl/alibabacloudtasksettings.go index 57a5e3a11b..6fcec1a870 100644 --- a/typedapi/esdsl/alibabacloudtasksettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/allfield.go b/typedapi/esdsl/allfield.go index 120d93a16b..a9b614ba9e 100644 --- a/typedapi/esdsl/allfield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/allocateaction.go b/typedapi/esdsl/allocateaction.go index 0dc1c31150..c93e87db6a 100644 --- a/typedapi/esdsl/allocateaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/alwayscondition.go b/typedapi/esdsl/alwayscondition.go index 1eef8ba439..3494e67fd1 100644 --- a/typedapi/esdsl/alwayscondition.go +++ b/typedapi/esdsl/alwayscondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/amazonbedrockservicesettings.go b/typedapi/esdsl/amazonbedrockservicesettings.go index b60fb4611d..819ab761f7 100644 --- a/typedapi/esdsl/amazonbedrockservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/amazonbedrocktasksettings.go b/typedapi/esdsl/amazonbedrocktasksettings.go index 2508266e19..b1b8906c93 100644 --- a/typedapi/esdsl/amazonbedrocktasksettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/amazonsagemakerservicesettings.go b/typedapi/esdsl/amazonsagemakerservicesettings.go new file mode 100644 index 0000000000..12c4e172da --- /dev/null +++ b/typedapi/esdsl/amazonsagemakerservicesettings.go @@ -0,0 +1,121 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/amazonsagemakerapi" +) + +type _amazonSageMakerServiceSettings struct { + v *types.AmazonSageMakerServiceSettings +} + +func NewAmazonSageMakerServiceSettings(accesskey string, api amazonsagemakerapi.AmazonSageMakerApi, endpointname string, region string, secretkey string) *_amazonSageMakerServiceSettings { + + tmp := &_amazonSageMakerServiceSettings{v: types.NewAmazonSageMakerServiceSettings()} + + tmp.AccessKey(accesskey) + + tmp.Api(api) + + tmp.EndpointName(endpointname) + + tmp.Region(region) + + tmp.SecretKey(secretkey) + + return tmp + +} + +func (s *_amazonSageMakerServiceSettings) AccessKey(accesskey string) *_amazonSageMakerServiceSettings { + + s.v.AccessKey = accesskey + + return s +} + +func (s *_amazonSageMakerServiceSettings) Api(api amazonsagemakerapi.AmazonSageMakerApi) *_amazonSageMakerServiceSettings { + + s.v.Api = api + return s +} + +func (s *_amazonSageMakerServiceSettings) BatchSize(batchsize int) *_amazonSageMakerServiceSettings { + + s.v.BatchSize = &batchsize + + return s +} + +func (s *_amazonSageMakerServiceSettings) Dimensions(dimensions int) *_amazonSageMakerServiceSettings { + + s.v.Dimensions = &dimensions + + return s +} + +func (s *_amazonSageMakerServiceSettings) EndpointName(endpointname string) *_amazonSageMakerServiceSettings { + + s.v.EndpointName = endpointname + + return s +} + +func (s *_amazonSageMakerServiceSettings) InferenceComponentName(inferencecomponentname string) *_amazonSageMakerServiceSettings { + + s.v.InferenceComponentName = &inferencecomponentname + + return s +} + +func (s *_amazonSageMakerServiceSettings) Region(region string) *_amazonSageMakerServiceSettings { + + s.v.Region = region + + return s +} + +func (s *_amazonSageMakerServiceSettings) SecretKey(secretkey string) *_amazonSageMakerServiceSettings { + + s.v.SecretKey = secretkey + + return s +} + +func (s *_amazonSageMakerServiceSettings) TargetContainerHostname(targetcontainerhostname string) *_amazonSageMakerServiceSettings { + + s.v.TargetContainerHostname = &targetcontainerhostname + + return s +} + +func (s *_amazonSageMakerServiceSettings) TargetModel(targetmodel string) *_amazonSageMakerServiceSettings { + + s.v.TargetModel = &targetmodel + + return s +} + +func (s *_amazonSageMakerServiceSettings) AmazonSageMakerServiceSettingsCaster() *types.AmazonSageMakerServiceSettings { + return s.v +} diff --git a/typedapi/esdsl/amazonsagemakertasksettings.go b/typedapi/esdsl/amazonsagemakertasksettings.go new file mode 100644 index 0000000000..6522192c7d --- /dev/null +++ b/typedapi/esdsl/amazonsagemakertasksettings.go @@ -0,0 +1,72 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _amazonSageMakerTaskSettings struct { + v *types.AmazonSageMakerTaskSettings +} + +func NewAmazonSageMakerTaskSettings() *_amazonSageMakerTaskSettings { + + return &_amazonSageMakerTaskSettings{v: types.NewAmazonSageMakerTaskSettings()} + +} + +func (s *_amazonSageMakerTaskSettings) CustomAttributes(customattributes string) *_amazonSageMakerTaskSettings { + + s.v.CustomAttributes = &customattributes + + return s +} + +func (s *_amazonSageMakerTaskSettings) EnableExplanations(enableexplanations string) *_amazonSageMakerTaskSettings { + + s.v.EnableExplanations = &enableexplanations + + return s +} + +func (s *_amazonSageMakerTaskSettings) InferenceId(inferenceid string) *_amazonSageMakerTaskSettings { + + s.v.InferenceId = &inferenceid + + return s +} + +func (s *_amazonSageMakerTaskSettings) SessionId(sessionid string) *_amazonSageMakerTaskSettings { + + s.v.SessionId = &sessionid + + return s +} + +func (s *_amazonSageMakerTaskSettings) TargetVariant(targetvariant string) *_amazonSageMakerTaskSettings { + + s.v.TargetVariant = &targetvariant + + return s +} + +func (s *_amazonSageMakerTaskSettings) AmazonSageMakerTaskSettingsCaster() *types.AmazonSageMakerTaskSettings { + return s.v +} diff --git a/typedapi/esdsl/analysisconfig.go b/typedapi/esdsl/analysisconfig.go index 5c1e2cc398..db9a4c7ea7 100644 --- a/typedapi/esdsl/analysisconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/analysislimits.go b/typedapi/esdsl/analysislimits.go index 85b4337df5..887760e941 100644 --- a/typedapi/esdsl/analysislimits.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/analysismemorylimit.go b/typedapi/esdsl/analysismemorylimit.go index c6f12a76c6..fb46984cae 100644 --- a/typedapi/esdsl/analysismemorylimit.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/analyzer.go b/typedapi/esdsl/analyzer.go index bd8412aea6..af310ebc0a 100644 --- a/typedapi/esdsl/analyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -44,7 +44,7 @@ func (u *_analyzer) UnknownAnalyzer(unknown json.RawMessage) *_analyzer { func (u *_analyzer) CustomAnalyzer(customanalyzer types.CustomAnalyzerVariant) *_analyzer { - u.v = &customanalyzer + u.v = customanalyzer.CustomAnalyzerCaster() return u } @@ -57,7 +57,7 @@ func (u *_customAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) FingerprintAnalyzer(fingerprintanalyzer types.FingerprintAnalyzerVariant) *_analyzer { - u.v = &fingerprintanalyzer + u.v = fingerprintanalyzer.FingerprintAnalyzerCaster() return u } @@ -70,7 +70,7 @@ func (u *_fingerprintAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) KeywordAnalyzer(keywordanalyzer types.KeywordAnalyzerVariant) *_analyzer { - u.v = &keywordanalyzer + u.v = keywordanalyzer.KeywordAnalyzerCaster() return u } @@ -83,7 +83,7 @@ func (u *_keywordAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) NoriAnalyzer(norianalyzer types.NoriAnalyzerVariant) *_analyzer { - u.v = &norianalyzer + u.v = norianalyzer.NoriAnalyzerCaster() return u } @@ -96,7 +96,7 @@ func (u *_noriAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) PatternAnalyzer(patternanalyzer types.PatternAnalyzerVariant) *_analyzer { - u.v = &patternanalyzer + u.v = patternanalyzer.PatternAnalyzerCaster() return u } @@ -109,7 +109,7 @@ func (u *_patternAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) SimpleAnalyzer(simpleanalyzer types.SimpleAnalyzerVariant) *_analyzer { - u.v = &simpleanalyzer + u.v = simpleanalyzer.SimpleAnalyzerCaster() return u } @@ -122,7 +122,7 @@ func (u *_simpleAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) StandardAnalyzer(standardanalyzer types.StandardAnalyzerVariant) *_analyzer { - u.v = &standardanalyzer + u.v = standardanalyzer.StandardAnalyzerCaster() return u } @@ -135,7 +135,7 @@ func (u *_standardAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) StopAnalyzer(stopanalyzer types.StopAnalyzerVariant) *_analyzer { - u.v = &stopanalyzer + u.v = stopanalyzer.StopAnalyzerCaster() return u } @@ -148,7 +148,7 @@ func (u *_stopAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) WhitespaceAnalyzer(whitespaceanalyzer types.WhitespaceAnalyzerVariant) *_analyzer { - u.v = &whitespaceanalyzer + u.v = whitespaceanalyzer.WhitespaceAnalyzerCaster() return u } @@ -161,7 +161,7 @@ func (u *_whitespaceAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) IcuAnalyzer(icuanalyzer types.IcuAnalyzerVariant) *_analyzer { - u.v = &icuanalyzer + u.v = icuanalyzer.IcuAnalyzerCaster() return u } @@ -174,7 +174,7 @@ func (u *_icuAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) KuromojiAnalyzer(kuromojianalyzer types.KuromojiAnalyzerVariant) *_analyzer { - u.v = &kuromojianalyzer + u.v = kuromojianalyzer.KuromojiAnalyzerCaster() return u } @@ -187,7 +187,7 @@ func (u *_kuromojiAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) SnowballAnalyzer(snowballanalyzer types.SnowballAnalyzerVariant) *_analyzer { - u.v = &snowballanalyzer + u.v = snowballanalyzer.SnowballAnalyzerCaster() return u } @@ -200,7 +200,7 @@ func (u *_snowballAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) ArabicAnalyzer(arabicanalyzer types.ArabicAnalyzerVariant) *_analyzer { - u.v = &arabicanalyzer + u.v = arabicanalyzer.ArabicAnalyzerCaster() return u } @@ -213,7 +213,7 @@ func (u *_arabicAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) ArmenianAnalyzer(armeniananalyzer types.ArmenianAnalyzerVariant) *_analyzer { - u.v = &armeniananalyzer + u.v = armeniananalyzer.ArmenianAnalyzerCaster() return u } @@ -226,7 +226,7 @@ func (u *_armenianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) BasqueAnalyzer(basqueanalyzer types.BasqueAnalyzerVariant) *_analyzer { - u.v = &basqueanalyzer + u.v = basqueanalyzer.BasqueAnalyzerCaster() return u } @@ -239,7 +239,7 @@ func (u *_basqueAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) BengaliAnalyzer(bengalianalyzer types.BengaliAnalyzerVariant) *_analyzer { - u.v = &bengalianalyzer + u.v = bengalianalyzer.BengaliAnalyzerCaster() return u } @@ -252,7 +252,7 @@ func (u *_bengaliAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) BrazilianAnalyzer(braziliananalyzer types.BrazilianAnalyzerVariant) *_analyzer { - u.v = &braziliananalyzer + u.v = braziliananalyzer.BrazilianAnalyzerCaster() return u } @@ -265,7 +265,7 @@ func (u *_brazilianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) BulgarianAnalyzer(bulgariananalyzer types.BulgarianAnalyzerVariant) *_analyzer { - u.v = &bulgariananalyzer + u.v = bulgariananalyzer.BulgarianAnalyzerCaster() return u } @@ -278,7 +278,7 @@ func (u *_bulgarianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) CatalanAnalyzer(catalananalyzer types.CatalanAnalyzerVariant) *_analyzer { - u.v = &catalananalyzer + u.v = catalananalyzer.CatalanAnalyzerCaster() return u } @@ -291,7 +291,7 @@ func (u *_catalanAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) ChineseAnalyzer(chineseanalyzer types.ChineseAnalyzerVariant) *_analyzer { - u.v = &chineseanalyzer + u.v = chineseanalyzer.ChineseAnalyzerCaster() return u } @@ -304,7 +304,7 @@ func (u *_chineseAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) CjkAnalyzer(cjkanalyzer types.CjkAnalyzerVariant) *_analyzer { - u.v = &cjkanalyzer + u.v = cjkanalyzer.CjkAnalyzerCaster() return u } @@ -317,7 +317,7 @@ func (u *_cjkAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) CzechAnalyzer(czechanalyzer types.CzechAnalyzerVariant) *_analyzer { - u.v = &czechanalyzer + u.v = czechanalyzer.CzechAnalyzerCaster() return u } @@ -330,7 +330,7 @@ func (u *_czechAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) DanishAnalyzer(danishanalyzer types.DanishAnalyzerVariant) *_analyzer { - u.v = &danishanalyzer + u.v = danishanalyzer.DanishAnalyzerCaster() return u } @@ -343,7 +343,7 @@ func (u *_danishAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) DutchAnalyzer(dutchanalyzer types.DutchAnalyzerVariant) *_analyzer { - u.v = &dutchanalyzer + u.v = dutchanalyzer.DutchAnalyzerCaster() return u } @@ -356,7 +356,7 @@ func (u *_dutchAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) EnglishAnalyzer(englishanalyzer types.EnglishAnalyzerVariant) *_analyzer { - u.v = &englishanalyzer + u.v = englishanalyzer.EnglishAnalyzerCaster() return u } @@ -369,7 +369,7 @@ func (u *_englishAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) EstonianAnalyzer(estoniananalyzer types.EstonianAnalyzerVariant) *_analyzer { - u.v = &estoniananalyzer + u.v = estoniananalyzer.EstonianAnalyzerCaster() return u } @@ -382,7 +382,7 @@ func (u *_estonianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) FinnishAnalyzer(finnishanalyzer types.FinnishAnalyzerVariant) *_analyzer { - u.v = &finnishanalyzer + u.v = finnishanalyzer.FinnishAnalyzerCaster() return u } @@ -395,7 +395,7 @@ func (u *_finnishAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) FrenchAnalyzer(frenchanalyzer types.FrenchAnalyzerVariant) *_analyzer { - u.v = &frenchanalyzer + u.v = frenchanalyzer.FrenchAnalyzerCaster() return u } @@ -408,7 +408,7 @@ func (u *_frenchAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) GalicianAnalyzer(galiciananalyzer types.GalicianAnalyzerVariant) *_analyzer { - u.v = &galiciananalyzer + u.v = galiciananalyzer.GalicianAnalyzerCaster() return u } @@ -421,7 +421,7 @@ func (u *_galicianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) GermanAnalyzer(germananalyzer types.GermanAnalyzerVariant) *_analyzer { - u.v = &germananalyzer + u.v = germananalyzer.GermanAnalyzerCaster() return u } @@ -434,7 +434,7 @@ func (u *_germanAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) GreekAnalyzer(greekanalyzer types.GreekAnalyzerVariant) *_analyzer { - u.v = &greekanalyzer + u.v = greekanalyzer.GreekAnalyzerCaster() return u } @@ -447,7 +447,7 @@ func (u *_greekAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) HindiAnalyzer(hindianalyzer types.HindiAnalyzerVariant) *_analyzer { - u.v = &hindianalyzer + u.v = hindianalyzer.HindiAnalyzerCaster() return u } @@ -460,7 +460,7 @@ func (u *_hindiAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) HungarianAnalyzer(hungariananalyzer types.HungarianAnalyzerVariant) *_analyzer { - u.v = &hungariananalyzer + u.v = hungariananalyzer.HungarianAnalyzerCaster() return u } @@ -473,7 +473,7 @@ func (u *_hungarianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) IndonesianAnalyzer(indonesiananalyzer types.IndonesianAnalyzerVariant) *_analyzer { - u.v = &indonesiananalyzer + u.v = indonesiananalyzer.IndonesianAnalyzerCaster() return u } @@ -486,7 +486,7 @@ func (u *_indonesianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) IrishAnalyzer(irishanalyzer types.IrishAnalyzerVariant) *_analyzer { - u.v = &irishanalyzer + u.v = irishanalyzer.IrishAnalyzerCaster() return u } @@ -499,7 +499,7 @@ func (u *_irishAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) ItalianAnalyzer(italiananalyzer types.ItalianAnalyzerVariant) *_analyzer { - u.v = &italiananalyzer + u.v = italiananalyzer.ItalianAnalyzerCaster() return u } @@ -512,7 +512,7 @@ func (u *_italianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) LatvianAnalyzer(latviananalyzer types.LatvianAnalyzerVariant) *_analyzer { - u.v = &latviananalyzer + u.v = latviananalyzer.LatvianAnalyzerCaster() return u } @@ -525,7 +525,7 @@ func (u *_latvianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) LithuanianAnalyzer(lithuaniananalyzer types.LithuanianAnalyzerVariant) *_analyzer { - u.v = &lithuaniananalyzer + u.v = lithuaniananalyzer.LithuanianAnalyzerCaster() return u } @@ -538,7 +538,7 @@ func (u *_lithuanianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) NorwegianAnalyzer(norwegiananalyzer types.NorwegianAnalyzerVariant) *_analyzer { - u.v = &norwegiananalyzer + u.v = norwegiananalyzer.NorwegianAnalyzerCaster() return u } @@ -551,7 +551,7 @@ func (u *_norwegianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) PersianAnalyzer(persiananalyzer types.PersianAnalyzerVariant) *_analyzer { - u.v = &persiananalyzer + u.v = persiananalyzer.PersianAnalyzerCaster() return u } @@ -564,7 +564,7 @@ func (u *_persianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) PortugueseAnalyzer(portugueseanalyzer types.PortugueseAnalyzerVariant) *_analyzer { - u.v = &portugueseanalyzer + u.v = portugueseanalyzer.PortugueseAnalyzerCaster() return u } @@ -577,7 +577,7 @@ func (u *_portugueseAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) RomanianAnalyzer(romaniananalyzer types.RomanianAnalyzerVariant) *_analyzer { - u.v = &romaniananalyzer + u.v = romaniananalyzer.RomanianAnalyzerCaster() return u } @@ -590,7 +590,7 @@ func (u *_romanianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) RussianAnalyzer(russiananalyzer types.RussianAnalyzerVariant) *_analyzer { - u.v = &russiananalyzer + u.v = russiananalyzer.RussianAnalyzerCaster() return u } @@ -603,7 +603,7 @@ func (u *_russianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) SerbianAnalyzer(serbiananalyzer types.SerbianAnalyzerVariant) *_analyzer { - u.v = &serbiananalyzer + u.v = serbiananalyzer.SerbianAnalyzerCaster() return u } @@ -616,7 +616,7 @@ func (u *_serbianAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) SoraniAnalyzer(soranianalyzer types.SoraniAnalyzerVariant) *_analyzer { - u.v = &soranianalyzer + u.v = soranianalyzer.SoraniAnalyzerCaster() return u } @@ -629,7 +629,7 @@ func (u *_soraniAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) SpanishAnalyzer(spanishanalyzer types.SpanishAnalyzerVariant) *_analyzer { - u.v = &spanishanalyzer + u.v = spanishanalyzer.SpanishAnalyzerCaster() return u } @@ -642,7 +642,7 @@ func (u *_spanishAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) SwedishAnalyzer(swedishanalyzer types.SwedishAnalyzerVariant) *_analyzer { - u.v = &swedishanalyzer + u.v = swedishanalyzer.SwedishAnalyzerCaster() return u } @@ -655,7 +655,7 @@ func (u *_swedishAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) TurkishAnalyzer(turkishanalyzer types.TurkishAnalyzerVariant) *_analyzer { - u.v = &turkishanalyzer + u.v = turkishanalyzer.TurkishAnalyzerCaster() return u } @@ -668,7 +668,7 @@ func (u *_turkishAnalyzer) AnalyzerCaster() *types.Analyzer { func (u *_analyzer) ThaiAnalyzer(thaianalyzer types.ThaiAnalyzerVariant) *_analyzer { - u.v = &thaianalyzer + u.v = thaianalyzer.ThaiAnalyzerCaster() return u } diff --git a/typedapi/esdsl/anthropicservicesettings.go b/typedapi/esdsl/anthropicservicesettings.go index 8fe443c555..58afa70249 100644 --- a/typedapi/esdsl/anthropicservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/anthropictasksettings.go b/typedapi/esdsl/anthropictasksettings.go index f0ab8b0153..c40a8f380c 100644 --- a/typedapi/esdsl/anthropictasksettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/apikeyaggregationcontainer.go b/typedapi/esdsl/apikeyaggregationcontainer.go index e1e3b8fb14..70e2a1891b 100644 --- a/typedapi/esdsl/apikeyaggregationcontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/apikeyfiltersaggregation.go b/typedapi/esdsl/apikeyfiltersaggregation.go index 14d231bc03..583a48468d 100644 --- a/typedapi/esdsl/apikeyfiltersaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/apikeyquerycontainer.go b/typedapi/esdsl/apikeyquerycontainer.go index 77e0ad3d17..1633ece5af 100644 --- a/typedapi/esdsl/apikeyquerycontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/apostrophetokenfilter.go b/typedapi/esdsl/apostrophetokenfilter.go new file mode 100644 index 0000000000..91e99f6521 --- /dev/null +++ b/typedapi/esdsl/apostrophetokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _apostropheTokenFilter struct { + v *types.ApostropheTokenFilter +} + +func NewApostropheTokenFilter() *_apostropheTokenFilter { + + return &_apostropheTokenFilter{v: types.NewApostropheTokenFilter()} + +} + +func (s *_apostropheTokenFilter) Version(versionstring string) *_apostropheTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_apostropheTokenFilter) ApostropheTokenFilterCaster() *types.ApostropheTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/appendprocessor.go b/typedapi/esdsl/appendprocessor.go index 19f35a2380..d428b7eee2 100644 --- a/typedapi/esdsl/appendprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/applicationglobaluserprivileges.go b/typedapi/esdsl/applicationglobaluserprivileges.go index 80aab30b97..0b06034ff5 100644 --- a/typedapi/esdsl/applicationglobaluserprivileges.go +++ b/typedapi/esdsl/applicationglobaluserprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/applicationprivileges.go b/typedapi/esdsl/applicationprivileges.go index fb30bcccc0..802917f3c3 100644 --- a/typedapi/esdsl/applicationprivileges.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/applicationprivilegescheck.go b/typedapi/esdsl/applicationprivilegescheck.go index 9d66c9cd1c..16879cd053 100644 --- a/typedapi/esdsl/applicationprivilegescheck.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/arabicanalyzer.go b/typedapi/esdsl/arabicanalyzer.go index f8e3f7a7e7..102ab5a4fb 100644 --- a/typedapi/esdsl/arabicanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_arabicAnalyzer) StemExclusion(stemexclusions ...string) *_arabicAnalyz return s } -func (s *_arabicAnalyzer) Stopwords(stopwords ...string) *_arabicAnalyzer { +func (s *_arabicAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_arabicAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/arabicnormalizationtokenfilter.go b/typedapi/esdsl/arabicnormalizationtokenfilter.go new file mode 100644 index 0000000000..4df2d39c9f --- /dev/null +++ b/typedapi/esdsl/arabicnormalizationtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _arabicNormalizationTokenFilter struct { + v *types.ArabicNormalizationTokenFilter +} + +func NewArabicNormalizationTokenFilter() *_arabicNormalizationTokenFilter { + + return &_arabicNormalizationTokenFilter{v: types.NewArabicNormalizationTokenFilter()} + +} + +func (s *_arabicNormalizationTokenFilter) Version(versionstring string) *_arabicNormalizationTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_arabicNormalizationTokenFilter) ArabicNormalizationTokenFilterCaster() *types.ArabicNormalizationTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/arabicstemtokenfilter.go b/typedapi/esdsl/arabicstemtokenfilter.go new file mode 100644 index 0000000000..7d3287a99d --- /dev/null +++ b/typedapi/esdsl/arabicstemtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _arabicStemTokenFilter struct { + v *types.ArabicStemTokenFilter +} + +func NewArabicStemTokenFilter() *_arabicStemTokenFilter { + + return &_arabicStemTokenFilter{v: types.NewArabicStemTokenFilter()} + +} + +func (s *_arabicStemTokenFilter) Version(versionstring string) *_arabicStemTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_arabicStemTokenFilter) ArabicStemTokenFilterCaster() *types.ArabicStemTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/armeniananalyzer.go b/typedapi/esdsl/armeniananalyzer.go index 8a43e6803f..566baae218 100644 --- a/typedapi/esdsl/armeniananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_armenianAnalyzer) StemExclusion(stemexclusions ...string) *_armenianAn return s } -func (s *_armenianAnalyzer) Stopwords(stopwords ...string) *_armenianAnalyzer { +func (s *_armenianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_armenianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/arraycomparecondition.go b/typedapi/esdsl/arraycomparecondition.go index 1195dd8c8c..39c138b836 100644 --- a/typedapi/esdsl/arraycomparecondition.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/arraycompareopparams.go b/typedapi/esdsl/arraycompareopparams.go index c57e9fee98..02d1e91b5a 100644 --- a/typedapi/esdsl/arraycompareopparams.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/asciifoldingtokenfilter.go b/typedapi/esdsl/asciifoldingtokenfilter.go index 8f193bc89c..73a111cf25 100644 --- a/typedapi/esdsl/asciifoldingtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/attachmentprocessor.go b/typedapi/esdsl/attachmentprocessor.go index 42d57ed97a..27cbf20a0a 100644 --- a/typedapi/esdsl/attachmentprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/autodatehistogramaggregation.go b/typedapi/esdsl/autodatehistogramaggregation.go index eb9598c7dc..4a22152ba5 100644 --- a/typedapi/esdsl/autodatehistogramaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/autoscalingpolicy.go b/typedapi/esdsl/autoscalingpolicy.go index 0257628f10..454b8c92b9 100644 --- a/typedapi/esdsl/autoscalingpolicy.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/averageaggregation.go b/typedapi/esdsl/averageaggregation.go index dc57048cf4..7e3d73bd8e 100644 --- a/typedapi/esdsl/averageaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/averagebucketaggregation.go b/typedapi/esdsl/averagebucketaggregation.go index bca01ff522..d4f2cacc4e 100644 --- a/typedapi/esdsl/averagebucketaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/azureaistudioservicesettings.go b/typedapi/esdsl/azureaistudioservicesettings.go index 4335e2b339..c608ec5844 100644 --- a/typedapi/esdsl/azureaistudioservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/azureaistudiotasksettings.go b/typedapi/esdsl/azureaistudiotasksettings.go index 861b908508..3ba7992a76 100644 --- a/typedapi/esdsl/azureaistudiotasksettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/azureopenaiservicesettings.go b/typedapi/esdsl/azureopenaiservicesettings.go index f688d62f57..5139a2e998 100644 --- a/typedapi/esdsl/azureopenaiservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/azureopenaitasksettings.go b/typedapi/esdsl/azureopenaitasksettings.go index c50c4cc086..5c38d33bbe 100644 --- a/typedapi/esdsl/azureopenaitasksettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/azurerepository.go b/typedapi/esdsl/azurerepository.go index 1d8adfbfbf..3517ae2488 100644 --- a/typedapi/esdsl/azurerepository.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/azurerepositorysettings.go b/typedapi/esdsl/azurerepositorysettings.go index 5f4063d064..336a3b3802 100644 --- a/typedapi/esdsl/azurerepositorysettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/basqueanalyzer.go b/typedapi/esdsl/basqueanalyzer.go index 8740d8e3d0..df98812e2d 100644 --- a/typedapi/esdsl/basqueanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_basqueAnalyzer) StemExclusion(stemexclusions ...string) *_basqueAnalyz return s } -func (s *_basqueAnalyzer) Stopwords(stopwords ...string) *_basqueAnalyzer { +func (s *_basqueAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_basqueAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/bengalianalyzer.go b/typedapi/esdsl/bengalianalyzer.go index a007a8abde..5976fc49db 100644 --- a/typedapi/esdsl/bengalianalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_bengaliAnalyzer) StemExclusion(stemexclusions ...string) *_bengaliAnal return s } -func (s *_bengaliAnalyzer) Stopwords(stopwords ...string) *_bengaliAnalyzer { +func (s *_bengaliAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_bengaliAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/bengalinormalizationtokenfilter.go b/typedapi/esdsl/bengalinormalizationtokenfilter.go new file mode 100644 index 0000000000..9bdd8c083b --- /dev/null +++ b/typedapi/esdsl/bengalinormalizationtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _bengaliNormalizationTokenFilter struct { + v *types.BengaliNormalizationTokenFilter +} + +func NewBengaliNormalizationTokenFilter() *_bengaliNormalizationTokenFilter { + + return &_bengaliNormalizationTokenFilter{v: types.NewBengaliNormalizationTokenFilter()} + +} + +func (s *_bengaliNormalizationTokenFilter) Version(versionstring string) *_bengaliNormalizationTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_bengaliNormalizationTokenFilter) BengaliNormalizationTokenFilterCaster() *types.BengaliNormalizationTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/binaryproperty.go b/typedapi/esdsl/binaryproperty.go index 7e0223677f..fee80d0975 100644 --- a/typedapi/esdsl/binaryproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/booleanproperty.go b/typedapi/esdsl/booleanproperty.go index 9844b9d78e..3a1bacbc9e 100644 --- a/typedapi/esdsl/booleanproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/boolquery.go b/typedapi/esdsl/boolquery.go index 9014ba82ae..e763a7841e 100644 --- a/typedapi/esdsl/boolquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -26,7 +26,7 @@ type _boolQuery struct { v *types.BoolQuery } -// matches roles matching boolean combinations of other queries. +// matches documents matching boolean combinations of other queries. func NewBoolQuery() *_boolQuery { return &_boolQuery{v: types.NewBoolQuery()} diff --git a/typedapi/esdsl/boostingquery.go b/typedapi/esdsl/boostingquery.go index 22730812e0..ac42355af9 100644 --- a/typedapi/esdsl/boostingquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/boxplotaggregation.go b/typedapi/esdsl/boxplotaggregation.go index 603da4b29e..8636d281ed 100644 --- a/typedapi/esdsl/boxplotaggregation.go +++ b/typedapi/esdsl/boxplotaggregation.go @@ -16,11 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl -import "github.com/elastic/go-elasticsearch/v9/typedapi/types" +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tdigestexecutionhint" +) type _boxplotAggregation struct { v *types.BoxplotAggregation @@ -41,6 +44,12 @@ func (s *_boxplotAggregation) Compression(compression types.Float64) *_boxplotAg return s } +func (s *_boxplotAggregation) ExecutionHint(executionhint tdigestexecutionhint.TDigestExecutionHint) *_boxplotAggregation { + + s.v.ExecutionHint = &executionhint + return s +} + func (s *_boxplotAggregation) Field(field string) *_boxplotAggregation { s.v.Field = &field diff --git a/typedapi/esdsl/braziliananalyzer.go b/typedapi/esdsl/braziliananalyzer.go index a77b0fc039..246ab46ada 100644 --- a/typedapi/esdsl/braziliananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -32,9 +32,9 @@ func NewBrazilianAnalyzer() *_brazilianAnalyzer { } -func (s *_brazilianAnalyzer) Stopwords(stopwords ...string) *_brazilianAnalyzer { +func (s *_brazilianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_brazilianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/brazilianstemtokenfilter.go b/typedapi/esdsl/brazilianstemtokenfilter.go new file mode 100644 index 0000000000..20154e5ea4 --- /dev/null +++ b/typedapi/esdsl/brazilianstemtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _brazilianStemTokenFilter struct { + v *types.BrazilianStemTokenFilter +} + +func NewBrazilianStemTokenFilter() *_brazilianStemTokenFilter { + + return &_brazilianStemTokenFilter{v: types.NewBrazilianStemTokenFilter()} + +} + +func (s *_brazilianStemTokenFilter) Version(versionstring string) *_brazilianStemTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_brazilianStemTokenFilter) BrazilianStemTokenFilterCaster() *types.BrazilianStemTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/bucketcorrelationaggregation.go b/typedapi/esdsl/bucketcorrelationaggregation.go index fd967a00cd..ab9786b3f3 100644 --- a/typedapi/esdsl/bucketcorrelationaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bucketcorrelationfunction.go b/typedapi/esdsl/bucketcorrelationfunction.go index cd60aaa3c3..0d44a2fe3a 100644 --- a/typedapi/esdsl/bucketcorrelationfunction.go +++ b/typedapi/esdsl/bucketcorrelationfunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bucketcorrelationfunctioncountcorrelation.go b/typedapi/esdsl/bucketcorrelationfunctioncountcorrelation.go index 851fa98e7e..5f2daf1ad6 100644 --- a/typedapi/esdsl/bucketcorrelationfunctioncountcorrelation.go +++ b/typedapi/esdsl/bucketcorrelationfunctioncountcorrelation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bucketcorrelationfunctioncountcorrelationindicator.go b/typedapi/esdsl/bucketcorrelationfunctioncountcorrelationindicator.go index cf06ca1bc7..c3a0f598b0 100644 --- a/typedapi/esdsl/bucketcorrelationfunctioncountcorrelationindicator.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bucketksaggregation.go b/typedapi/esdsl/bucketksaggregation.go index 57013b4199..fa09d231fd 100644 --- a/typedapi/esdsl/bucketksaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bucketsapikeyquerycontainer.go b/typedapi/esdsl/bucketsapikeyquerycontainer.go index 7ccb71abf4..e69477e273 100644 --- a/typedapi/esdsl/bucketsapikeyquerycontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bucketscriptaggregation.go b/typedapi/esdsl/bucketscriptaggregation.go index f4c3f9e906..4eb480e38f 100644 --- a/typedapi/esdsl/bucketscriptaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bucketselectoraggregation.go b/typedapi/esdsl/bucketselectoraggregation.go index d778b0ced7..6e5413a55d 100644 --- a/typedapi/esdsl/bucketselectoraggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bucketsortaggregation.go b/typedapi/esdsl/bucketsortaggregation.go index ee4e1ead66..96f5df5d27 100644 --- a/typedapi/esdsl/bucketsortaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bucketspath.go b/typedapi/esdsl/bucketspath.go index 5d84f7e7de..76f892e265 100644 --- a/typedapi/esdsl/bucketspath.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bucketsquery.go b/typedapi/esdsl/bucketsquery.go index afd7cd55dd..0d7744cf8d 100644 --- a/typedapi/esdsl/bucketsquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bulgariananalyzer.go b/typedapi/esdsl/bulgariananalyzer.go index 09192a0107..95242ceaf1 100644 --- a/typedapi/esdsl/bulgariananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_bulgarianAnalyzer) StemExclusion(stemexclusions ...string) *_bulgarian return s } -func (s *_bulgarianAnalyzer) Stopwords(stopwords ...string) *_bulgarianAnalyzer { +func (s *_bulgarianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_bulgarianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/bytenumberproperty.go b/typedapi/esdsl/bytenumberproperty.go index e99f2852e0..91396449d4 100644 --- a/typedapi/esdsl/bytenumberproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bytesize.go b/typedapi/esdsl/bytesize.go index d3734fc9e8..c4f53f726c 100644 --- a/typedapi/esdsl/bytesize.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/bytesprocessor.go b/typedapi/esdsl/bytesprocessor.go index 305de76569..194163d523 100644 --- a/typedapi/esdsl/bytesprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/cachequeries.go b/typedapi/esdsl/cachequeries.go index 7ab7d49be8..0906cf5149 100644 --- a/typedapi/esdsl/cachequeries.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/calendarevent.go b/typedapi/esdsl/calendarevent.go index b021e0a5ef..333082b70b 100644 --- a/typedapi/esdsl/calendarevent.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/cardinalityaggregation.go b/typedapi/esdsl/cardinalityaggregation.go index 70c7318a5c..dcc3cb8314 100644 --- a/typedapi/esdsl/cardinalityaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/catalananalyzer.go b/typedapi/esdsl/catalananalyzer.go index 21d8f3c598..b11960e5f5 100644 --- a/typedapi/esdsl/catalananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_catalanAnalyzer) StemExclusion(stemexclusions ...string) *_catalanAnal return s } -func (s *_catalanAnalyzer) Stopwords(stopwords ...string) *_catalanAnalyzer { +func (s *_catalanAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_catalanAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/categorizationanalyzer.go b/typedapi/esdsl/categorizationanalyzer.go index 1ce7dd6590..868fbc633e 100644 --- a/typedapi/esdsl/categorizationanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -40,7 +40,7 @@ func (u *_categorizationAnalyzer) String(string string) *_categorizationAnalyzer func (u *_categorizationAnalyzer) CategorizationAnalyzerDefinition(categorizationanalyzerdefinition types.CategorizationAnalyzerDefinitionVariant) *_categorizationAnalyzer { - u.v = &categorizationanalyzerdefinition + u.v = categorizationanalyzerdefinition.CategorizationAnalyzerDefinitionCaster() return u } diff --git a/typedapi/esdsl/categorizationanalyzerdefinition.go b/typedapi/esdsl/categorizationanalyzerdefinition.go index 5bd3bf348c..5ad4aa6fd0 100644 --- a/typedapi/esdsl/categorizationanalyzerdefinition.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/categorizetextaggregation.go b/typedapi/esdsl/categorizetextaggregation.go index 0652102771..f16b29691a 100644 --- a/typedapi/esdsl/categorizetextaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/categorizetextanalyzer.go b/typedapi/esdsl/categorizetextanalyzer.go index e0045de028..ed9ae13e59 100644 --- a/typedapi/esdsl/categorizetextanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -40,7 +40,7 @@ func (u *_categorizeTextAnalyzer) String(string string) *_categorizeTextAnalyzer func (u *_categorizeTextAnalyzer) CustomCategorizeTextAnalyzer(customcategorizetextanalyzer types.CustomCategorizeTextAnalyzerVariant) *_categorizeTextAnalyzer { - u.v = &customcategorizetextanalyzer + u.v = customcategorizetextanalyzer.CustomCategorizeTextAnalyzerCaster() return u } diff --git a/typedapi/esdsl/chaininput.go b/typedapi/esdsl/chaininput.go index b7391c04af..e0dd1e1647 100644 --- a/typedapi/esdsl/chaininput.go +++ b/typedapi/esdsl/chaininput.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/charfilter.go b/typedapi/esdsl/charfilter.go index 76ac84c60a..c509468508 100644 --- a/typedapi/esdsl/charfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/charfilterdefinition.go b/typedapi/esdsl/charfilterdefinition.go index 4a54431f9a..395dd41d23 100644 --- a/typedapi/esdsl/charfilterdefinition.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -44,7 +44,7 @@ func (u *_charFilterDefinition) UnknownCharFilterDefinition(unknown json.RawMess func (u *_charFilterDefinition) HtmlStripCharFilter(htmlstripcharfilter types.HtmlStripCharFilterVariant) *_charFilterDefinition { - u.v = &htmlstripcharfilter + u.v = htmlstripcharfilter.HtmlStripCharFilterCaster() return u } @@ -57,7 +57,7 @@ func (u *_htmlStripCharFilter) CharFilterDefinitionCaster() *types.CharFilterDef func (u *_charFilterDefinition) MappingCharFilter(mappingcharfilter types.MappingCharFilterVariant) *_charFilterDefinition { - u.v = &mappingcharfilter + u.v = mappingcharfilter.MappingCharFilterCaster() return u } @@ -70,7 +70,7 @@ func (u *_mappingCharFilter) CharFilterDefinitionCaster() *types.CharFilterDefin func (u *_charFilterDefinition) PatternReplaceCharFilter(patternreplacecharfilter types.PatternReplaceCharFilterVariant) *_charFilterDefinition { - u.v = &patternreplacecharfilter + u.v = patternreplacecharfilter.PatternReplaceCharFilterCaster() return u } @@ -83,7 +83,7 @@ func (u *_patternReplaceCharFilter) CharFilterDefinitionCaster() *types.CharFilt func (u *_charFilterDefinition) IcuNormalizationCharFilter(icunormalizationcharfilter types.IcuNormalizationCharFilterVariant) *_charFilterDefinition { - u.v = &icunormalizationcharfilter + u.v = icunormalizationcharfilter.IcuNormalizationCharFilterCaster() return u } @@ -96,7 +96,7 @@ func (u *_icuNormalizationCharFilter) CharFilterDefinitionCaster() *types.CharFi func (u *_charFilterDefinition) KuromojiIterationMarkCharFilter(kuromojiiterationmarkcharfilter types.KuromojiIterationMarkCharFilterVariant) *_charFilterDefinition { - u.v = &kuromojiiterationmarkcharfilter + u.v = kuromojiiterationmarkcharfilter.KuromojiIterationMarkCharFilterCaster() return u } diff --git a/typedapi/esdsl/chargrouptokenizer.go b/typedapi/esdsl/chargrouptokenizer.go index e05beb696f..2d2e1c9ad5 100644 --- a/typedapi/esdsl/chargrouptokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/childrenaggregation.go b/typedapi/esdsl/childrenaggregation.go index 4ff8a3d473..8d11a38a19 100644 --- a/typedapi/esdsl/childrenaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/chineseanalyzer.go b/typedapi/esdsl/chineseanalyzer.go index 71fc4eec5d..39aa9397ac 100644 --- a/typedapi/esdsl/chineseanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -32,9 +32,9 @@ func NewChineseAnalyzer() *_chineseAnalyzer { } -func (s *_chineseAnalyzer) Stopwords(stopwords ...string) *_chineseAnalyzer { +func (s *_chineseAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_chineseAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/chisquareheuristic.go b/typedapi/esdsl/chisquareheuristic.go index 61c68814fa..95a9cf3650 100644 --- a/typedapi/esdsl/chisquareheuristic.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/chunkingconfig.go b/typedapi/esdsl/chunkingconfig.go index 8e7be01968..41fe2bb8c7 100644 --- a/typedapi/esdsl/chunkingconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/chunkingsettings.go b/typedapi/esdsl/chunkingsettings.go index 3b4e46000e..43056a069f 100644 --- a/typedapi/esdsl/chunkingsettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/circleprocessor.go b/typedapi/esdsl/circleprocessor.go index f25ef9953f..3bb8264d18 100644 --- a/typedapi/esdsl/circleprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/cjkanalyzer.go b/typedapi/esdsl/cjkanalyzer.go index c38c47f3c8..32d204e7fa 100644 --- a/typedapi/esdsl/cjkanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -32,9 +32,9 @@ func NewCjkAnalyzer() *_cjkAnalyzer { } -func (s *_cjkAnalyzer) Stopwords(stopwords ...string) *_cjkAnalyzer { +func (s *_cjkAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_cjkAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/cjkbigramtokenfilter.go b/typedapi/esdsl/cjkbigramtokenfilter.go new file mode 100644 index 0000000000..6d09a6e386 --- /dev/null +++ b/typedapi/esdsl/cjkbigramtokenfilter.go @@ -0,0 +1,64 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/cjkbigramignoredscript" +) + +type _cjkBigramTokenFilter struct { + v *types.CjkBigramTokenFilter +} + +func NewCjkBigramTokenFilter() *_cjkBigramTokenFilter { + + return &_cjkBigramTokenFilter{v: types.NewCjkBigramTokenFilter()} + +} + +func (s *_cjkBigramTokenFilter) IgnoredScripts(ignoredscripts ...cjkbigramignoredscript.CjkBigramIgnoredScript) *_cjkBigramTokenFilter { + + for _, v := range ignoredscripts { + + s.v.IgnoredScripts = append(s.v.IgnoredScripts, v) + + } + return s +} + +func (s *_cjkBigramTokenFilter) OutputUnigrams(outputunigrams bool) *_cjkBigramTokenFilter { + + s.v.OutputUnigrams = &outputunigrams + + return s +} + +func (s *_cjkBigramTokenFilter) Version(versionstring string) *_cjkBigramTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_cjkBigramTokenFilter) CjkBigramTokenFilterCaster() *types.CjkBigramTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/cjkwidthtokenfilter.go b/typedapi/esdsl/cjkwidthtokenfilter.go new file mode 100644 index 0000000000..58003021e4 --- /dev/null +++ b/typedapi/esdsl/cjkwidthtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _cjkWidthTokenFilter struct { + v *types.CjkWidthTokenFilter +} + +func NewCjkWidthTokenFilter() *_cjkWidthTokenFilter { + + return &_cjkWidthTokenFilter{v: types.NewCjkWidthTokenFilter()} + +} + +func (s *_cjkWidthTokenFilter) Version(versionstring string) *_cjkWidthTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_cjkWidthTokenFilter) CjkWidthTokenFilterCaster() *types.CjkWidthTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/classictokenfilter.go b/typedapi/esdsl/classictokenfilter.go new file mode 100644 index 0000000000..b8825dd4e2 --- /dev/null +++ b/typedapi/esdsl/classictokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _classicTokenFilter struct { + v *types.ClassicTokenFilter +} + +func NewClassicTokenFilter() *_classicTokenFilter { + + return &_classicTokenFilter{v: types.NewClassicTokenFilter()} + +} + +func (s *_classicTokenFilter) Version(versionstring string) *_classicTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_classicTokenFilter) ClassicTokenFilterCaster() *types.ClassicTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/classictokenizer.go b/typedapi/esdsl/classictokenizer.go index 4732f137ab..5d0dad08b3 100644 --- a/typedapi/esdsl/classictokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/classificationinferenceoptions.go b/typedapi/esdsl/classificationinferenceoptions.go index ddc48a9591..151add920e 100644 --- a/typedapi/esdsl/classificationinferenceoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/cohereservicesettings.go b/typedapi/esdsl/cohereservicesettings.go index 8f058589b2..0af62e17b3 100644 --- a/typedapi/esdsl/cohereservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/coheretasksettings.go b/typedapi/esdsl/coheretasksettings.go index e6b82a2dcd..5a1a305d2b 100644 --- a/typedapi/esdsl/coheretasksettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/combinedfieldsquery.go b/typedapi/esdsl/combinedfieldsquery.go index 30c17fa06d..7ae7288dfd 100644 --- a/typedapi/esdsl/combinedfieldsquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/command.go b/typedapi/esdsl/command.go index e308e936d2..a3b2f4c261 100644 --- a/typedapi/esdsl/command.go +++ b/typedapi/esdsl/command.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/commandallocateprimaryaction.go b/typedapi/esdsl/commandallocateprimaryaction.go index fc5c945318..2265506dbd 100644 --- a/typedapi/esdsl/commandallocateprimaryaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/commandallocatereplicaaction.go b/typedapi/esdsl/commandallocatereplicaaction.go index 20e3b722da..9a3b3a1ea1 100644 --- a/typedapi/esdsl/commandallocatereplicaaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/commandcancelaction.go b/typedapi/esdsl/commandcancelaction.go index 60133922bd..5dae7a62c4 100644 --- a/typedapi/esdsl/commandcancelaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/commandmoveaction.go b/typedapi/esdsl/commandmoveaction.go index 808247a05b..b9c4c8b627 100644 --- a/typedapi/esdsl/commandmoveaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/commongramstokenfilter.go b/typedapi/esdsl/commongramstokenfilter.go index 5b25bfe3b8..3180c17001 100644 --- a/typedapi/esdsl/commongramstokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/commontermsquery.go b/typedapi/esdsl/commontermsquery.go index b6b7ecdff6..4d191722a5 100644 --- a/typedapi/esdsl/commontermsquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/communityidprocessor.go b/typedapi/esdsl/communityidprocessor.go index 79a6161719..124226dbf6 100644 --- a/typedapi/esdsl/communityidprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/completioncontext.go b/typedapi/esdsl/completioncontext.go index 30f4a84876..d44d88e1e2 100644 --- a/typedapi/esdsl/completioncontext.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/completionproperty.go b/typedapi/esdsl/completionproperty.go index b335e57de4..08a3db1e8a 100644 --- a/typedapi/esdsl/completionproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/completionsuggester.go b/typedapi/esdsl/completionsuggester.go index 3ab2cb292e..34a399a3ad 100644 --- a/typedapi/esdsl/completionsuggester.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/completiontool.go b/typedapi/esdsl/completiontool.go index 77eb25cb07..85bb32317b 100644 --- a/typedapi/esdsl/completiontool.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/completiontoolchoice.go b/typedapi/esdsl/completiontoolchoice.go index b6e7e172a8..a386689ef6 100644 --- a/typedapi/esdsl/completiontoolchoice.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/completiontoolchoicefunction.go b/typedapi/esdsl/completiontoolchoicefunction.go index 76717caa9f..4fffd416d9 100644 --- a/typedapi/esdsl/completiontoolchoicefunction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/completiontoolfunction.go b/typedapi/esdsl/completiontoolfunction.go index 8a63b86e17..12ad5af4a3 100644 --- a/typedapi/esdsl/completiontoolfunction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/completiontooltype.go b/typedapi/esdsl/completiontooltype.go index 5dc735e5e6..ce9531d33d 100644 --- a/typedapi/esdsl/completiontooltype.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -40,7 +40,7 @@ func (u *_completionToolType) String(string string) *_completionToolType { func (u *_completionToolType) CompletionToolChoice(completiontoolchoice types.CompletionToolChoiceVariant) *_completionToolType { - u.v = &completiontoolchoice + u.v = completiontoolchoice.CompletionToolChoiceCaster() return u } diff --git a/typedapi/esdsl/componenttemplatenode.go b/typedapi/esdsl/componenttemplatenode.go index 6d23b3daf5..42b6c039ac 100644 --- a/typedapi/esdsl/componenttemplatenode.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/componenttemplatesummary.go b/typedapi/esdsl/componenttemplatesummary.go index d866ce2571..3038ec144c 100644 --- a/typedapi/esdsl/componenttemplatesummary.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -53,6 +53,13 @@ func (s *_componentTemplateSummary) AddAlias(key string, value types.AliasDefini return s } +func (s *_componentTemplateSummary) DataStreamOptions(datastreamoptions types.DataStreamOptionsTemplateVariant) *_componentTemplateSummary { + + s.v.DataStreamOptions = datastreamoptions.DataStreamOptionsTemplateCaster() + + return s +} + func (s *_componentTemplateSummary) Lifecycle(lifecycle types.DataStreamLifecycleWithRolloverVariant) *_componentTemplateSummary { s.v.Lifecycle = lifecycle.DataStreamLifecycleWithRolloverCaster() diff --git a/typedapi/esdsl/compositeaggregatekey.go b/typedapi/esdsl/compositeaggregatekey.go index e6b80954fe..4375adc08e 100644 --- a/typedapi/esdsl/compositeaggregatekey.go +++ b/typedapi/esdsl/compositeaggregatekey.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/compositeaggregation.go b/typedapi/esdsl/compositeaggregation.go index ca2a755d45..9fb52f059b 100644 --- a/typedapi/esdsl/compositeaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/compositeaggregationsource.go b/typedapi/esdsl/compositeaggregationsource.go index a5c95342bf..ad2a043dff 100644 --- a/typedapi/esdsl/compositeaggregationsource.go +++ b/typedapi/esdsl/compositeaggregationsource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/compositedatehistogramaggregation.go b/typedapi/esdsl/compositedatehistogramaggregation.go index 87fc937efd..cc6343b7aa 100644 --- a/typedapi/esdsl/compositedatehistogramaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/compositegeotilegridaggregation.go b/typedapi/esdsl/compositegeotilegridaggregation.go index 52f503f228..5934d6f09c 100644 --- a/typedapi/esdsl/compositegeotilegridaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/compositehistogramaggregation.go b/typedapi/esdsl/compositehistogramaggregation.go index 68d06a4589..4bf2624204 100644 --- a/typedapi/esdsl/compositehistogramaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/compositesubfield.go b/typedapi/esdsl/compositesubfield.go index b54246cd17..1a9fa1db9a 100644 --- a/typedapi/esdsl/compositesubfield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/compositetermsaggregation.go b/typedapi/esdsl/compositetermsaggregation.go index c66737014a..1346372227 100644 --- a/typedapi/esdsl/compositetermsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/conditiontokenfilter.go b/typedapi/esdsl/conditiontokenfilter.go index a54e1db75a..1bd20b5887 100644 --- a/typedapi/esdsl/conditiontokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/configuration.go b/typedapi/esdsl/configuration.go index bb64a2e949..2745fc2d2b 100644 --- a/typedapi/esdsl/configuration.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/connectorconfigproperties.go b/typedapi/esdsl/connectorconfigproperties.go index dffea00761..1d67ec8cea 100644 --- a/typedapi/esdsl/connectorconfigproperties.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/connectorconfiguration.go b/typedapi/esdsl/connectorconfiguration.go index 145e8cee2c..5706143a06 100644 --- a/typedapi/esdsl/connectorconfiguration.go +++ b/typedapi/esdsl/connectorconfiguration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/connectorfeatures.go b/typedapi/esdsl/connectorfeatures.go index d4454d19a8..44efd70694 100644 --- a/typedapi/esdsl/connectorfeatures.go +++ b/typedapi/esdsl/connectorfeatures.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/connectorscheduling.go b/typedapi/esdsl/connectorscheduling.go index 9c9eda6c02..cef9886c40 100644 --- a/typedapi/esdsl/connectorscheduling.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/constantkeywordproperty.go b/typedapi/esdsl/constantkeywordproperty.go index 4e20eb14c6..b9e95cca60 100644 --- a/typedapi/esdsl/constantkeywordproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/constantscorequery.go b/typedapi/esdsl/constantscorequery.go index 24db6f895e..54bfdd7395 100644 --- a/typedapi/esdsl/constantscorequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/contentobject.go b/typedapi/esdsl/contentobject.go index 03e2e45017..54d6d546c4 100644 --- a/typedapi/esdsl/contentobject.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/context.go b/typedapi/esdsl/context.go index 9ab1fbef08..d255872dd6 100644 --- a/typedapi/esdsl/context.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/convertprocessor.go b/typedapi/esdsl/convertprocessor.go index 7548f2f6e2..1280eb4d88 100644 --- a/typedapi/esdsl/convertprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/coordsgeobounds.go b/typedapi/esdsl/coordsgeobounds.go index 64afa89eac..1eea2bdbde 100644 --- a/typedapi/esdsl/coordsgeobounds.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/countedkeywordproperty.go b/typedapi/esdsl/countedkeywordproperty.go index b9b976e138..e420219aa8 100644 --- a/typedapi/esdsl/countedkeywordproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/createfrom.go b/typedapi/esdsl/createfrom.go index 048046438a..753531560f 100644 --- a/typedapi/esdsl/createfrom.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/createoperation.go b/typedapi/esdsl/createoperation.go index 36d74e7f2e..05d8896610 100644 --- a/typedapi/esdsl/createoperation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/csvprocessor.go b/typedapi/esdsl/csvprocessor.go index 868d22a33d..51a052e2d9 100644 --- a/typedapi/esdsl/csvprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/cumulativecardinalityaggregation.go b/typedapi/esdsl/cumulativecardinalityaggregation.go index 89f43b0d85..8fea75ff6c 100644 --- a/typedapi/esdsl/cumulativecardinalityaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/cumulativesumaggregation.go b/typedapi/esdsl/cumulativesumaggregation.go index 96eb620ed2..ecf3625610 100644 --- a/typedapi/esdsl/cumulativesumaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/customanalyzer.go b/typedapi/esdsl/customanalyzer.go index 8f179007d1..2a6f88bd4e 100644 --- a/typedapi/esdsl/customanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/customcategorizetextanalyzer.go b/typedapi/esdsl/customcategorizetextanalyzer.go index 2220b2c908..6e13447002 100644 --- a/typedapi/esdsl/customcategorizetextanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/customnormalizer.go b/typedapi/esdsl/customnormalizer.go index 249220f6d8..3eb8942fda 100644 --- a/typedapi/esdsl/customnormalizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/customrequestparams.go b/typedapi/esdsl/customrequestparams.go new file mode 100644 index 0000000000..ae970d11e2 --- /dev/null +++ b/typedapi/esdsl/customrequestparams.go @@ -0,0 +1,48 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _customRequestParams struct { + v *types.CustomRequestParams +} + +func NewCustomRequestParams(content string) *_customRequestParams { + + tmp := &_customRequestParams{v: types.NewCustomRequestParams()} + + tmp.Content(content) + + return tmp + +} + +func (s *_customRequestParams) Content(content string) *_customRequestParams { + + s.v.Content = content + + return s +} + +func (s *_customRequestParams) CustomRequestParamsCaster() *types.CustomRequestParams { + return s.v +} diff --git a/typedapi/esdsl/customresponseparams.go b/typedapi/esdsl/customresponseparams.go new file mode 100644 index 0000000000..422c4b9f3c --- /dev/null +++ b/typedapi/esdsl/customresponseparams.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +type _customResponseParams struct { + v *types.CustomResponseParams +} + +func NewCustomResponseParams(jsonparser json.RawMessage) *_customResponseParams { + + tmp := &_customResponseParams{v: types.NewCustomResponseParams()} + + tmp.JsonParser(jsonparser) + + return tmp + +} + +func (s *_customResponseParams) JsonParser(jsonparser json.RawMessage) *_customResponseParams { + + s.v.JsonParser = jsonparser + + return s +} + +func (s *_customResponseParams) CustomResponseParamsCaster() *types.CustomResponseParams { + return s.v +} diff --git a/typedapi/esdsl/customservicesettings.go b/typedapi/esdsl/customservicesettings.go new file mode 100644 index 0000000000..32d0629345 --- /dev/null +++ b/typedapi/esdsl/customservicesettings.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +type _customServiceSettings struct { + v *types.CustomServiceSettings +} + +func NewCustomServiceSettings(request types.CustomRequestParamsVariant, response types.CustomResponseParamsVariant, secretparameters json.RawMessage) *_customServiceSettings { + + tmp := &_customServiceSettings{v: types.NewCustomServiceSettings()} + + tmp.Request(request) + + tmp.Response(response) + + tmp.SecretParameters(secretparameters) + + return tmp + +} + +func (s *_customServiceSettings) Headers(headers json.RawMessage) *_customServiceSettings { + + s.v.Headers = headers + + return s +} + +func (s *_customServiceSettings) InputType(inputtype json.RawMessage) *_customServiceSettings { + + s.v.InputType = inputtype + + return s +} + +func (s *_customServiceSettings) QueryParameters(queryparameters json.RawMessage) *_customServiceSettings { + + s.v.QueryParameters = queryparameters + + return s +} + +func (s *_customServiceSettings) Request(request types.CustomRequestParamsVariant) *_customServiceSettings { + + s.v.Request = *request.CustomRequestParamsCaster() + + return s +} + +func (s *_customServiceSettings) Response(response types.CustomResponseParamsVariant) *_customServiceSettings { + + s.v.Response = *response.CustomResponseParamsCaster() + + return s +} + +func (s *_customServiceSettings) SecretParameters(secretparameters json.RawMessage) *_customServiceSettings { + + s.v.SecretParameters = secretparameters + + return s +} + +func (s *_customServiceSettings) Url(url string) *_customServiceSettings { + + s.v.Url = &url + + return s +} + +func (s *_customServiceSettings) CustomServiceSettingsCaster() *types.CustomServiceSettings { + return s.v +} diff --git a/typedapi/esdsl/customtasksettings.go b/typedapi/esdsl/customtasksettings.go new file mode 100644 index 0000000000..a4db4cf76d --- /dev/null +++ b/typedapi/esdsl/customtasksettings.go @@ -0,0 +1,48 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +type _customTaskSettings struct { + v *types.CustomTaskSettings +} + +func NewCustomTaskSettings() *_customTaskSettings { + + return &_customTaskSettings{v: types.NewCustomTaskSettings()} + +} + +func (s *_customTaskSettings) Parameters(parameters json.RawMessage) *_customTaskSettings { + + s.v.Parameters = parameters + + return s +} + +func (s *_customTaskSettings) CustomTaskSettingsCaster() *types.CustomTaskSettings { + return s.v +} diff --git a/typedapi/esdsl/czechanalyzer.go b/typedapi/esdsl/czechanalyzer.go index 1119d9b9ed..fb470c2407 100644 --- a/typedapi/esdsl/czechanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_czechAnalyzer) StemExclusion(stemexclusions ...string) *_czechAnalyzer return s } -func (s *_czechAnalyzer) Stopwords(stopwords ...string) *_czechAnalyzer { +func (s *_czechAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_czechAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/czechstemtokenfilter.go b/typedapi/esdsl/czechstemtokenfilter.go new file mode 100644 index 0000000000..dcc788c19c --- /dev/null +++ b/typedapi/esdsl/czechstemtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _czechStemTokenFilter struct { + v *types.CzechStemTokenFilter +} + +func NewCzechStemTokenFilter() *_czechStemTokenFilter { + + return &_czechStemTokenFilter{v: types.NewCzechStemTokenFilter()} + +} + +func (s *_czechStemTokenFilter) Version(versionstring string) *_czechStemTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_czechStemTokenFilter) CzechStemTokenFilterCaster() *types.CzechStemTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/dailyschedule.go b/typedapi/esdsl/dailyschedule.go index 8947b1eb2e..fa0b6b06eb 100644 --- a/typedapi/esdsl/dailyschedule.go +++ b/typedapi/esdsl/dailyschedule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/danishanalyzer.go b/typedapi/esdsl/danishanalyzer.go index 40cb54decd..5f5d3c1717 100644 --- a/typedapi/esdsl/danishanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -32,9 +32,9 @@ func NewDanishAnalyzer() *_danishAnalyzer { } -func (s *_danishAnalyzer) Stopwords(stopwords ...string) *_danishAnalyzer { +func (s *_danishAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_danishAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/databaseconfiguration.go b/typedapi/esdsl/databaseconfiguration.go index 1028a54f0d..ccb4ee6085 100644 --- a/typedapi/esdsl/databaseconfiguration.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datadescription.go b/typedapi/esdsl/datadescription.go index 497c561443..4cabc0bdd4 100644 --- a/typedapi/esdsl/datadescription.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataemailattachment.go b/typedapi/esdsl/dataemailattachment.go index 81e9a88664..6d39cddd39 100644 --- a/typedapi/esdsl/dataemailattachment.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datafeedconfig.go b/typedapi/esdsl/datafeedconfig.go index 4264aa05fb..7ef3878104 100644 --- a/typedapi/esdsl/datafeedconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalysisanalyzedfields.go b/typedapi/esdsl/dataframeanalysisanalyzedfields.go index efe66fd8b3..6deff3863d 100644 --- a/typedapi/esdsl/dataframeanalysisanalyzedfields.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalysisclassification.go b/typedapi/esdsl/dataframeanalysisclassification.go index 26a78ab5f3..a2402b805f 100644 --- a/typedapi/esdsl/dataframeanalysisclassification.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalysiscontainer.go b/typedapi/esdsl/dataframeanalysiscontainer.go index 4492b25418..a0897651e0 100644 --- a/typedapi/esdsl/dataframeanalysiscontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalysisfeatureprocessor.go b/typedapi/esdsl/dataframeanalysisfeatureprocessor.go index 0e706d8bfb..ce8a16a2ca 100644 --- a/typedapi/esdsl/dataframeanalysisfeatureprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalysisfeatureprocessorfrequencyencoding.go b/typedapi/esdsl/dataframeanalysisfeatureprocessorfrequencyencoding.go index c793887370..a780c83d4c 100644 --- a/typedapi/esdsl/dataframeanalysisfeatureprocessorfrequencyencoding.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalysisfeatureprocessormultiencoding.go b/typedapi/esdsl/dataframeanalysisfeatureprocessormultiencoding.go index 05ed0c5c4d..02be1e7b88 100644 --- a/typedapi/esdsl/dataframeanalysisfeatureprocessormultiencoding.go +++ b/typedapi/esdsl/dataframeanalysisfeatureprocessormultiencoding.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalysisfeatureprocessorngramencoding.go b/typedapi/esdsl/dataframeanalysisfeatureprocessorngramencoding.go index bb67770d16..524ee809a3 100644 --- a/typedapi/esdsl/dataframeanalysisfeatureprocessorngramencoding.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalysisfeatureprocessoronehotencoding.go b/typedapi/esdsl/dataframeanalysisfeatureprocessoronehotencoding.go index 9148ae7248..4985ff1f2e 100644 --- a/typedapi/esdsl/dataframeanalysisfeatureprocessoronehotencoding.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalysisfeatureprocessortargetmeanencoding.go b/typedapi/esdsl/dataframeanalysisfeatureprocessortargetmeanencoding.go index 03db82995f..7d31ced09c 100644 --- a/typedapi/esdsl/dataframeanalysisfeatureprocessortargetmeanencoding.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalysisoutlierdetection.go b/typedapi/esdsl/dataframeanalysisoutlierdetection.go index 0c67815fad..0eec4014e8 100644 --- a/typedapi/esdsl/dataframeanalysisoutlierdetection.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalysisregression.go b/typedapi/esdsl/dataframeanalysisregression.go index 80dad5169a..26baebc988 100644 --- a/typedapi/esdsl/dataframeanalysisregression.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalyticsdestination.go b/typedapi/esdsl/dataframeanalyticsdestination.go index 77b3b1242d..952c4a7de4 100644 --- a/typedapi/esdsl/dataframeanalyticsdestination.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeanalyticssource.go b/typedapi/esdsl/dataframeanalyticssource.go index 130995e235..90572669c4 100644 --- a/typedapi/esdsl/dataframeanalyticssource.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeevaluationclassification.go b/typedapi/esdsl/dataframeevaluationclassification.go index 579b269126..d52e817e3b 100644 --- a/typedapi/esdsl/dataframeevaluationclassification.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeevaluationclassificationmetrics.go b/typedapi/esdsl/dataframeevaluationclassificationmetrics.go index fda0670348..692b025b04 100644 --- a/typedapi/esdsl/dataframeevaluationclassificationmetrics.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeevaluationclassificationmetricsaucroc.go b/typedapi/esdsl/dataframeevaluationclassificationmetricsaucroc.go index c72bdf4e5e..7048640801 100644 --- a/typedapi/esdsl/dataframeevaluationclassificationmetricsaucroc.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeevaluationcontainer.go b/typedapi/esdsl/dataframeevaluationcontainer.go index 7e60da76c4..24f556103c 100644 --- a/typedapi/esdsl/dataframeevaluationcontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeevaluationoutlierdetection.go b/typedapi/esdsl/dataframeevaluationoutlierdetection.go index 359ab4c35a..b2a27c719e 100644 --- a/typedapi/esdsl/dataframeevaluationoutlierdetection.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeevaluationoutlierdetectionmetrics.go b/typedapi/esdsl/dataframeevaluationoutlierdetectionmetrics.go index fb9a41d186..05b87177d8 100644 --- a/typedapi/esdsl/dataframeevaluationoutlierdetectionmetrics.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeevaluationregression.go b/typedapi/esdsl/dataframeevaluationregression.go index 6a6451458f..fa940db8c4 100644 --- a/typedapi/esdsl/dataframeevaluationregression.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeevaluationregressionmetrics.go b/typedapi/esdsl/dataframeevaluationregressionmetrics.go index 32d2d76f4e..512206debf 100644 --- a/typedapi/esdsl/dataframeevaluationregressionmetrics.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeevaluationregressionmetricshuber.go b/typedapi/esdsl/dataframeevaluationregressionmetricshuber.go index 723ff012f0..2b85f5464e 100644 --- a/typedapi/esdsl/dataframeevaluationregressionmetricshuber.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframeevaluationregressionmetricsmsle.go b/typedapi/esdsl/dataframeevaluationregressionmetricsmsle.go index e90a4e2720..9d99669914 100644 --- a/typedapi/esdsl/dataframeevaluationregressionmetricsmsle.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dataframepreviewconfig.go b/typedapi/esdsl/dataframepreviewconfig.go index d65f742932..ad883e61f5 100644 --- a/typedapi/esdsl/dataframepreviewconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datastreamfailurestore.go b/typedapi/esdsl/datastreamfailurestore.go new file mode 100644 index 0000000000..135ee02bff --- /dev/null +++ b/typedapi/esdsl/datastreamfailurestore.go @@ -0,0 +1,51 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _dataStreamFailureStore struct { + v *types.DataStreamFailureStore +} + +func NewDataStreamFailureStore() *_dataStreamFailureStore { + + return &_dataStreamFailureStore{v: types.NewDataStreamFailureStore()} + +} + +func (s *_dataStreamFailureStore) Enabled(enabled bool) *_dataStreamFailureStore { + + s.v.Enabled = &enabled + + return s +} + +func (s *_dataStreamFailureStore) Lifecycle(lifecycle types.FailureStoreLifecycleVariant) *_dataStreamFailureStore { + + s.v.Lifecycle = lifecycle.FailureStoreLifecycleCaster() + + return s +} + +func (s *_dataStreamFailureStore) DataStreamFailureStoreCaster() *types.DataStreamFailureStore { + return s.v +} diff --git a/typedapi/esdsl/datastreamfailurestoretemplate.go b/typedapi/esdsl/datastreamfailurestoretemplate.go new file mode 100644 index 0000000000..ac5b08e17b --- /dev/null +++ b/typedapi/esdsl/datastreamfailurestoretemplate.go @@ -0,0 +1,51 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _dataStreamFailureStoreTemplate struct { + v *types.DataStreamFailureStoreTemplate +} + +func NewDataStreamFailureStoreTemplate() *_dataStreamFailureStoreTemplate { + + return &_dataStreamFailureStoreTemplate{v: types.NewDataStreamFailureStoreTemplate()} + +} + +func (s *_dataStreamFailureStoreTemplate) Enabled(enabled bool) *_dataStreamFailureStoreTemplate { + + s.v.Enabled = &enabled + + return s +} + +func (s *_dataStreamFailureStoreTemplate) Lifecycle(lifecycle types.FailureStoreLifecycleTemplateVariant) *_dataStreamFailureStoreTemplate { + + s.v.Lifecycle = lifecycle.FailureStoreLifecycleTemplateCaster() + + return s +} + +func (s *_dataStreamFailureStoreTemplate) DataStreamFailureStoreTemplateCaster() *types.DataStreamFailureStoreTemplate { + return s.v +} diff --git a/typedapi/esdsl/datastreamlifecycle.go b/typedapi/esdsl/datastreamlifecycle.go index 283ee29ea2..fa179ebe13 100644 --- a/typedapi/esdsl/datastreamlifecycle.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datastreamlifecycledownsampling.go b/typedapi/esdsl/datastreamlifecycledownsampling.go index 1f5a37c49a..6c844ef9f4 100644 --- a/typedapi/esdsl/datastreamlifecycledownsampling.go +++ b/typedapi/esdsl/datastreamlifecycledownsampling.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datastreamlifecyclerolloverconditions.go b/typedapi/esdsl/datastreamlifecyclerolloverconditions.go index 2893c9ca95..67fa0789c7 100644 --- a/typedapi/esdsl/datastreamlifecyclerolloverconditions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datastreamlifecyclewithrollover.go b/typedapi/esdsl/datastreamlifecyclewithrollover.go index 339405e481..cc338be3e4 100644 --- a/typedapi/esdsl/datastreamlifecyclewithrollover.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datastreamoptionstemplate.go b/typedapi/esdsl/datastreamoptionstemplate.go new file mode 100644 index 0000000000..85d6dd6d12 --- /dev/null +++ b/typedapi/esdsl/datastreamoptionstemplate.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _dataStreamOptionsTemplate struct { + v *types.DataStreamOptionsTemplate +} + +func NewDataStreamOptionsTemplate() *_dataStreamOptionsTemplate { + + return &_dataStreamOptionsTemplate{v: types.NewDataStreamOptionsTemplate()} + +} + +func (s *_dataStreamOptionsTemplate) FailureStore(failurestore types.DataStreamFailureStoreTemplateVariant) *_dataStreamOptionsTemplate { + + s.v.FailureStore = failurestore.DataStreamFailureStoreTemplateCaster() + + return s +} + +func (s *_dataStreamOptionsTemplate) DataStreamOptionsTemplateCaster() *types.DataStreamOptionsTemplate { + return s.v +} diff --git a/typedapi/esdsl/datastreamtimestamp.go b/typedapi/esdsl/datastreamtimestamp.go index 75de4666a0..27cd2d0258 100644 --- a/typedapi/esdsl/datastreamtimestamp.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datastreamvisibility.go b/typedapi/esdsl/datastreamvisibility.go index df2047cf8e..7db92c9c75 100644 --- a/typedapi/esdsl/datastreamvisibility.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datedecayfunction.go b/typedapi/esdsl/datedecayfunction.go index aab5f563a0..f1f7bdcfbf 100644 --- a/typedapi/esdsl/datedecayfunction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datedistancefeaturequery.go b/typedapi/esdsl/datedistancefeaturequery.go index d36dbad5cd..995bd50694 100644 --- a/typedapi/esdsl/datedistancefeaturequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datehistogramaggregation.go b/typedapi/esdsl/datehistogramaggregation.go index e0f52156bf..9501631560 100644 --- a/typedapi/esdsl/datehistogramaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datehistogramgrouping.go b/typedapi/esdsl/datehistogramgrouping.go index ea0e67e9d2..0b945c1b94 100644 --- a/typedapi/esdsl/datehistogramgrouping.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dateindexnameprocessor.go b/typedapi/esdsl/dateindexnameprocessor.go index 598d865946..27b36a6dd3 100644 --- a/typedapi/esdsl/dateindexnameprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/datenanosproperty.go b/typedapi/esdsl/datenanosproperty.go index 3bf0c8a8f4..d77f8a4920 100644 --- a/typedapi/esdsl/datenanosproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dateprocessor.go b/typedapi/esdsl/dateprocessor.go index 96981a590d..077d26f4e1 100644 --- a/typedapi/esdsl/dateprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dateproperty.go b/typedapi/esdsl/dateproperty.go index b5315eab1f..71f3c42e92 100644 --- a/typedapi/esdsl/dateproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/daterangeaggregation.go b/typedapi/esdsl/daterangeaggregation.go index fb3aa35bde..18e671b03b 100644 --- a/typedapi/esdsl/daterangeaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/daterangeexpression.go b/typedapi/esdsl/daterangeexpression.go index 9a6792f349..579944d199 100644 --- a/typedapi/esdsl/daterangeexpression.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/daterangeproperty.go b/typedapi/esdsl/daterangeproperty.go index 23422977e5..61df4ec8b9 100644 --- a/typedapi/esdsl/daterangeproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/daterangequery.go b/typedapi/esdsl/daterangequery.go index 12a3d3d21d..83b13ef6ca 100644 --- a/typedapi/esdsl/daterangequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -52,13 +52,6 @@ func (s *_dateRangeQuery) Format(dateformat string) *_dateRangeQuery { return s } -func (s *_dateRangeQuery) From(from string) *_dateRangeQuery { - - s.v.From = &from - - return s -} - func (s *_dateRangeQuery) Gt(datemath string) *_dateRangeQuery { s.v.Gt = &datemath @@ -107,13 +100,6 @@ func (s *_dateRangeQuery) TimeZone(timezone string) *_dateRangeQuery { return s } -func (s *_dateRangeQuery) To(to string) *_dateRangeQuery { - - s.v.To = &to - - return s -} - func (s *_dateRangeQuery) QueryCaster() *types.Query { container := types.NewQuery() container.Range = map[string]types.RangeQuery{ diff --git a/typedapi/esdsl/datetime.go b/typedapi/esdsl/datetime.go index 5a51b9972e..ecdaa8b3fc 100644 --- a/typedapi/esdsl/datetime.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/decayfunction.go b/typedapi/esdsl/decayfunction.go index 7543e7c383..cce522e482 100644 --- a/typedapi/esdsl/decayfunction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -33,7 +33,7 @@ func NewDecayFunction() *_decayFunction { func (u *_decayFunction) UntypedDecayFunction(untypeddecayfunction types.UntypedDecayFunctionVariant) *_decayFunction { - u.v = &untypeddecayfunction + u.v = untypeddecayfunction.UntypedDecayFunctionCaster() return u } @@ -46,7 +46,7 @@ func (u *_untypedDecayFunction) DecayFunctionCaster() *types.DecayFunction { func (u *_decayFunction) DateDecayFunction(datedecayfunction types.DateDecayFunctionVariant) *_decayFunction { - u.v = &datedecayfunction + u.v = datedecayfunction.DateDecayFunctionCaster() return u } @@ -59,7 +59,7 @@ func (u *_dateDecayFunction) DecayFunctionCaster() *types.DecayFunction { func (u *_decayFunction) NumericDecayFunction(numericdecayfunction types.NumericDecayFunctionVariant) *_decayFunction { - u.v = &numericdecayfunction + u.v = numericdecayfunction.NumericDecayFunctionCaster() return u } @@ -72,7 +72,7 @@ func (u *_numericDecayFunction) DecayFunctionCaster() *types.DecayFunction { func (u *_decayFunction) GeoDecayFunction(geodecayfunction types.GeoDecayFunctionVariant) *_decayFunction { - u.v = &geodecayfunction + u.v = geodecayfunction.GeoDecayFunctionCaster() return u } diff --git a/typedapi/esdsl/decayplacement.go b/typedapi/esdsl/decayplacement.go index c4f327ae41..44ef4e08de 100644 --- a/typedapi/esdsl/decayplacement.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/decayplacementdatemathduration.go b/typedapi/esdsl/decayplacementdatemathduration.go index 3268847f49..fdf098488e 100644 --- a/typedapi/esdsl/decayplacementdatemathduration.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/decayplacementdoubledouble.go b/typedapi/esdsl/decayplacementdoubledouble.go index 57bd5dfb7e..3ced90da94 100644 --- a/typedapi/esdsl/decayplacementdoubledouble.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/decayplacementgeolocationdistance.go b/typedapi/esdsl/decayplacementgeolocationdistance.go index 8988c06cdd..3c33cd6320 100644 --- a/typedapi/esdsl/decayplacementgeolocationdistance.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/decimaldigittokenfilter.go b/typedapi/esdsl/decimaldigittokenfilter.go new file mode 100644 index 0000000000..6ef07544d2 --- /dev/null +++ b/typedapi/esdsl/decimaldigittokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _decimalDigitTokenFilter struct { + v *types.DecimalDigitTokenFilter +} + +func NewDecimalDigitTokenFilter() *_decimalDigitTokenFilter { + + return &_decimalDigitTokenFilter{v: types.NewDecimalDigitTokenFilter()} + +} + +func (s *_decimalDigitTokenFilter) Version(versionstring string) *_decimalDigitTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_decimalDigitTokenFilter) DecimalDigitTokenFilterCaster() *types.DecimalDigitTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/deepseekservicesettings.go b/typedapi/esdsl/deepseekservicesettings.go new file mode 100644 index 0000000000..05a275d81f --- /dev/null +++ b/typedapi/esdsl/deepseekservicesettings.go @@ -0,0 +1,64 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _deepSeekServiceSettings struct { + v *types.DeepSeekServiceSettings +} + +func NewDeepSeekServiceSettings(apikey string, modelid string) *_deepSeekServiceSettings { + + tmp := &_deepSeekServiceSettings{v: types.NewDeepSeekServiceSettings()} + + tmp.ApiKey(apikey) + + tmp.ModelId(modelid) + + return tmp + +} + +func (s *_deepSeekServiceSettings) ApiKey(apikey string) *_deepSeekServiceSettings { + + s.v.ApiKey = apikey + + return s +} + +func (s *_deepSeekServiceSettings) ModelId(modelid string) *_deepSeekServiceSettings { + + s.v.ModelId = modelid + + return s +} + +func (s *_deepSeekServiceSettings) Url(url string) *_deepSeekServiceSettings { + + s.v.Url = &url + + return s +} + +func (s *_deepSeekServiceSettings) DeepSeekServiceSettingsCaster() *types.DeepSeekServiceSettings { + return s.v +} diff --git a/typedapi/esdsl/definition.go b/typedapi/esdsl/definition.go index 28ba98e487..1d1c25bfeb 100644 --- a/typedapi/esdsl/definition.go +++ b/typedapi/esdsl/definition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/delayeddatacheckconfig.go b/typedapi/esdsl/delayeddatacheckconfig.go index 94dce1f189..7b83a0e6fe 100644 --- a/typedapi/esdsl/delayeddatacheckconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/deleteaction.go b/typedapi/esdsl/deleteaction.go index db1bd9384f..d496fbd318 100644 --- a/typedapi/esdsl/deleteaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/deleteoperation.go b/typedapi/esdsl/deleteoperation.go index dac1b4637d..b316e0d8e5 100644 --- a/typedapi/esdsl/deleteoperation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/delimitedpayloadtokenfilter.go b/typedapi/esdsl/delimitedpayloadtokenfilter.go index 72c40ce647..7a960d627f 100644 --- a/typedapi/esdsl/delimitedpayloadtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/densevectorindexoptions.go b/typedapi/esdsl/densevectorindexoptions.go index 918149cf19..6f0a465801 100644 --- a/typedapi/esdsl/densevectorindexoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/densevectorindexoptionsrescorevector.go b/typedapi/esdsl/densevectorindexoptionsrescorevector.go index 7b64dfa20a..309f1fd007 100644 --- a/typedapi/esdsl/densevectorindexoptionsrescorevector.go +++ b/typedapi/esdsl/densevectorindexoptionsrescorevector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/densevectorproperty.go b/typedapi/esdsl/densevectorproperty.go index 71a7afb0fa..3d8aa8f8d8 100644 --- a/typedapi/esdsl/densevectorproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dependency.go b/typedapi/esdsl/dependency.go index 8e9b4f2f4e..4e53af3c42 100644 --- a/typedapi/esdsl/dependency.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/derivativeaggregation.go b/typedapi/esdsl/derivativeaggregation.go index 8954e3bf9a..5921e3206f 100644 --- a/typedapi/esdsl/derivativeaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/detectionrule.go b/typedapi/esdsl/detectionrule.go index 00eab03b6a..44c44d15dc 100644 --- a/typedapi/esdsl/detectionrule.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/detector.go b/typedapi/esdsl/detector.go index 0b6d989657..9f07ea24a7 100644 --- a/typedapi/esdsl/detector.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/detectorupdate.go b/typedapi/esdsl/detectorupdate.go index 8f1954806c..efd8768913 100644 --- a/typedapi/esdsl/detectorupdate.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dictionarydecompoundertokenfilter.go b/typedapi/esdsl/dictionarydecompoundertokenfilter.go index 432e027739..258ab8c8a1 100644 --- a/typedapi/esdsl/dictionarydecompoundertokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -32,13 +32,6 @@ func NewDictionaryDecompounderTokenFilter() *_dictionaryDecompounderTokenFilter } -func (s *_dictionaryDecompounderTokenFilter) HyphenationPatternsPath(hyphenationpatternspath string) *_dictionaryDecompounderTokenFilter { - - s.v.HyphenationPatternsPath = &hyphenationpatternspath - - return s -} - func (s *_dictionaryDecompounderTokenFilter) MaxSubwordSize(maxsubwordsize int) *_dictionaryDecompounderTokenFilter { s.v.MaxSubwordSize = &maxsubwordsize diff --git a/typedapi/esdsl/directgenerator.go b/typedapi/esdsl/directgenerator.go index 5bc6049ceb..2b3a237921 100644 --- a/typedapi/esdsl/directgenerator.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dismaxquery.go b/typedapi/esdsl/dismaxquery.go index ba8fdfeee0..6f3fca0a92 100644 --- a/typedapi/esdsl/dismaxquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dissectprocessor.go b/typedapi/esdsl/dissectprocessor.go index 3449764cd8..87cbd14715 100644 --- a/typedapi/esdsl/dissectprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/distancefeaturequery.go b/typedapi/esdsl/distancefeaturequery.go index f84b5bebd3..f99e690186 100644 --- a/typedapi/esdsl/distancefeaturequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -33,7 +33,7 @@ func NewDistanceFeatureQuery() *_distanceFeatureQuery { func (u *_distanceFeatureQuery) UntypedDistanceFeatureQuery(untypeddistancefeaturequery types.UntypedDistanceFeatureQueryVariant) *_distanceFeatureQuery { - u.v = &untypeddistancefeaturequery + u.v = untypeddistancefeaturequery.UntypedDistanceFeatureQueryCaster() return u } @@ -46,7 +46,7 @@ func (u *_untypedDistanceFeatureQuery) DistanceFeatureQueryCaster() *types.Dista func (u *_distanceFeatureQuery) GeoDistanceFeatureQuery(geodistancefeaturequery types.GeoDistanceFeatureQueryVariant) *_distanceFeatureQuery { - u.v = &geodistancefeaturequery + u.v = geodistancefeaturequery.GeoDistanceFeatureQueryCaster() return u } @@ -59,7 +59,7 @@ func (u *_geoDistanceFeatureQuery) DistanceFeatureQueryCaster() *types.DistanceF func (u *_distanceFeatureQuery) DateDistanceFeatureQuery(datedistancefeaturequery types.DateDistanceFeatureQueryVariant) *_distanceFeatureQuery { - u.v = &datedistancefeaturequery + u.v = datedistancefeaturequery.DateDistanceFeatureQueryCaster() return u } diff --git a/typedapi/esdsl/diversifiedsampleraggregation.go b/typedapi/esdsl/diversifiedsampleraggregation.go index 72125eed56..c30b00a310 100644 --- a/typedapi/esdsl/diversifiedsampleraggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/document.go b/typedapi/esdsl/document.go index e3e684fd72..2932608a14 100644 --- a/typedapi/esdsl/document.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/documentrating.go b/typedapi/esdsl/documentrating.go index 7e008591b5..5c64982022 100644 --- a/typedapi/esdsl/documentrating.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dotexpanderprocessor.go b/typedapi/esdsl/dotexpanderprocessor.go index af69f13e4d..76f628f012 100644 --- a/typedapi/esdsl/dotexpanderprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/doublenumberproperty.go b/typedapi/esdsl/doublenumberproperty.go index c9beca24f9..1a151deeb7 100644 --- a/typedapi/esdsl/doublenumberproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/doublerangeproperty.go b/typedapi/esdsl/doublerangeproperty.go index d2cbe924a4..3ebc368b2c 100644 --- a/typedapi/esdsl/doublerangeproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/downsampleaction.go b/typedapi/esdsl/downsampleaction.go index afa5d4f9aa..29c6066f10 100644 --- a/typedapi/esdsl/downsampleaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/downsampleconfig.go b/typedapi/esdsl/downsampleconfig.go index 4687598f7c..bca2f79689 100644 --- a/typedapi/esdsl/downsampleconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/downsamplinground.go b/typedapi/esdsl/downsamplinground.go index 6fbe530f51..6eb0be0d6f 100644 --- a/typedapi/esdsl/downsamplinground.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dropprocessor.go b/typedapi/esdsl/dropprocessor.go index be6eaceba3..dae2fa7994 100644 --- a/typedapi/esdsl/dropprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/duration.go b/typedapi/esdsl/duration.go index aa3f446624..67defc9809 100644 --- a/typedapi/esdsl/duration.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/durationvalueunitmillis.go b/typedapi/esdsl/durationvalueunitmillis.go index d2a2a541c2..4b86f8063d 100644 --- a/typedapi/esdsl/durationvalueunitmillis.go +++ b/typedapi/esdsl/durationvalueunitmillis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dutchanalyzer.go b/typedapi/esdsl/dutchanalyzer.go index 83e4fff437..afb998c717 100644 --- a/typedapi/esdsl/dutchanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_dutchAnalyzer) StemExclusion(stemexclusions ...string) *_dutchAnalyzer return s } -func (s *_dutchAnalyzer) Stopwords(stopwords ...string) *_dutchAnalyzer { +func (s *_dutchAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_dutchAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/dutchstemtokenfilter.go b/typedapi/esdsl/dutchstemtokenfilter.go new file mode 100644 index 0000000000..ebf44bdd77 --- /dev/null +++ b/typedapi/esdsl/dutchstemtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _dutchStemTokenFilter struct { + v *types.DutchStemTokenFilter +} + +func NewDutchStemTokenFilter() *_dutchStemTokenFilter { + + return &_dutchStemTokenFilter{v: types.NewDutchStemTokenFilter()} + +} + +func (s *_dutchStemTokenFilter) Version(versionstring string) *_dutchStemTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_dutchStemTokenFilter) DutchStemTokenFilterCaster() *types.DutchStemTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/dynamicproperty.go b/typedapi/esdsl/dynamicproperty.go index cc3e001c42..7f4cbb358d 100644 --- a/typedapi/esdsl/dynamicproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/dynamictemplate.go b/typedapi/esdsl/dynamictemplate.go index bafd953aff..337492e9f5 100644 --- a/typedapi/esdsl/dynamictemplate.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/edgengramtokenfilter.go b/typedapi/esdsl/edgengramtokenfilter.go index 0f5f53e559..eabc617613 100644 --- a/typedapi/esdsl/edgengramtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/edgengramtokenizer.go b/typedapi/esdsl/edgengramtokenizer.go index 4b62170056..eebfe80463 100644 --- a/typedapi/esdsl/edgengramtokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/elasticsearchservicesettings.go b/typedapi/esdsl/elasticsearchservicesettings.go index 50064715e2..4f5d8a1099 100644 --- a/typedapi/esdsl/elasticsearchservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/elasticsearchtasksettings.go b/typedapi/esdsl/elasticsearchtasksettings.go index e267561908..623d774c55 100644 --- a/typedapi/esdsl/elasticsearchtasksettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/elisiontokenfilter.go b/typedapi/esdsl/elisiontokenfilter.go index a06d5902fc..f98f9b7a3e 100644 --- a/typedapi/esdsl/elisiontokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/elserservicesettings.go b/typedapi/esdsl/elserservicesettings.go index dc0682e1d8..66bde3685c 100644 --- a/typedapi/esdsl/elserservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/emailaction.go b/typedapi/esdsl/emailaction.go index 8e1819d1d5..7de2c96f92 100644 --- a/typedapi/esdsl/emailaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/emailattachmentcontainer.go b/typedapi/esdsl/emailattachmentcontainer.go index 7599a63fd5..a5587647c8 100644 --- a/typedapi/esdsl/emailattachmentcontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/emailbody.go b/typedapi/esdsl/emailbody.go index 8595da044e..8f39efa9e0 100644 --- a/typedapi/esdsl/emailbody.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/emptyobject.go b/typedapi/esdsl/emptyobject.go index de1217fbe9..5dfe9d0a31 100644 --- a/typedapi/esdsl/emptyobject.go +++ b/typedapi/esdsl/emptyobject.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/englishanalyzer.go b/typedapi/esdsl/englishanalyzer.go index f7fc9f7fdf..b38ad932c1 100644 --- a/typedapi/esdsl/englishanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_englishAnalyzer) StemExclusion(stemexclusions ...string) *_englishAnal return s } -func (s *_englishAnalyzer) Stopwords(stopwords ...string) *_englishAnalyzer { +func (s *_englishAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_englishAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/enrichpolicy.go b/typedapi/esdsl/enrichpolicy.go index 93a68bb38c..26647ed8e0 100644 --- a/typedapi/esdsl/enrichpolicy.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/enrichprocessor.go b/typedapi/esdsl/enrichprocessor.go index 76c77d4b38..b878b05355 100644 --- a/typedapi/esdsl/enrichprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ensemble.go b/typedapi/esdsl/ensemble.go index d2ac6b023f..0e89cb1fc5 100644 --- a/typedapi/esdsl/ensemble.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/epochtimeunitmillis.go b/typedapi/esdsl/epochtimeunitmillis.go index e11f29e95b..32f3e4d467 100644 --- a/typedapi/esdsl/epochtimeunitmillis.go +++ b/typedapi/esdsl/epochtimeunitmillis.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/epochtimeunitseconds.go b/typedapi/esdsl/epochtimeunitseconds.go index 59e7adb6c7..fe9a8ddb05 100644 --- a/typedapi/esdsl/epochtimeunitseconds.go +++ b/typedapi/esdsl/epochtimeunitseconds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/estoniananalyzer.go b/typedapi/esdsl/estoniananalyzer.go index 966b9ed0e1..bcbd04cf75 100644 --- a/typedapi/esdsl/estoniananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -32,9 +32,9 @@ func NewEstonianAnalyzer() *_estonianAnalyzer { } -func (s *_estonianAnalyzer) Stopwords(stopwords ...string) *_estonianAnalyzer { +func (s *_estonianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_estonianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/ewmamodelsettings.go b/typedapi/esdsl/ewmamodelsettings.go index ad382aab7e..02ab41cb95 100644 --- a/typedapi/esdsl/ewmamodelsettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ewmamovingaverageaggregation.go b/typedapi/esdsl/ewmamovingaverageaggregation.go index c9e1949538..33de26fbcb 100644 --- a/typedapi/esdsl/ewmamovingaverageaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/executionstate.go b/typedapi/esdsl/executionstate.go index 0640b8db72..ad47dadfbf 100644 --- a/typedapi/esdsl/executionstate.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/existsquery.go b/typedapi/esdsl/existsquery.go index dfb7baaf76..e5127ed811 100644 --- a/typedapi/esdsl/existsquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/expandwildcards.go b/typedapi/esdsl/expandwildcards.go index e5d24da497..2a641e21c4 100644 --- a/typedapi/esdsl/expandwildcards.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/explorecontrols.go b/typedapi/esdsl/explorecontrols.go index 47db4dec3d..b978ace850 100644 --- a/typedapi/esdsl/explorecontrols.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/extendedboundsdouble.go b/typedapi/esdsl/extendedboundsdouble.go index 3498894f62..a2c8b6f857 100644 --- a/typedapi/esdsl/extendedboundsdouble.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/extendedboundsfielddatemath.go b/typedapi/esdsl/extendedboundsfielddatemath.go index 73c8d322aa..a1047b5272 100644 --- a/typedapi/esdsl/extendedboundsfielddatemath.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/extendedstatsaggregation.go b/typedapi/esdsl/extendedstatsaggregation.go index ed0ab1fcd8..abaebe6ccb 100644 --- a/typedapi/esdsl/extendedstatsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/extendedstatsbucketaggregation.go b/typedapi/esdsl/extendedstatsbucketaggregation.go index ef388deff0..48e45a3701 100644 --- a/typedapi/esdsl/extendedstatsbucketaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/failprocessor.go b/typedapi/esdsl/failprocessor.go index 667271e9eb..7359e93028 100644 --- a/typedapi/esdsl/failprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/failurestorelifecycle.go b/typedapi/esdsl/failurestorelifecycle.go new file mode 100644 index 0000000000..1316081713 --- /dev/null +++ b/typedapi/esdsl/failurestorelifecycle.go @@ -0,0 +1,51 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _failureStoreLifecycle struct { + v *types.FailureStoreLifecycle +} + +func NewFailureStoreLifecycle() *_failureStoreLifecycle { + + return &_failureStoreLifecycle{v: types.NewFailureStoreLifecycle()} + +} + +func (s *_failureStoreLifecycle) DataRetention(duration types.DurationVariant) *_failureStoreLifecycle { + + s.v.DataRetention = *duration.DurationCaster() + + return s +} + +func (s *_failureStoreLifecycle) Enabled(enabled bool) *_failureStoreLifecycle { + + s.v.Enabled = &enabled + + return s +} + +func (s *_failureStoreLifecycle) FailureStoreLifecycleCaster() *types.FailureStoreLifecycle { + return s.v +} diff --git a/typedapi/esdsl/failurestorelifecycletemplate.go b/typedapi/esdsl/failurestorelifecycletemplate.go new file mode 100644 index 0000000000..22fe3e3000 --- /dev/null +++ b/typedapi/esdsl/failurestorelifecycletemplate.go @@ -0,0 +1,51 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _failureStoreLifecycleTemplate struct { + v *types.FailureStoreLifecycleTemplate +} + +func NewFailureStoreLifecycleTemplate() *_failureStoreLifecycleTemplate { + + return &_failureStoreLifecycleTemplate{v: types.NewFailureStoreLifecycleTemplate()} + +} + +func (s *_failureStoreLifecycleTemplate) DataRetention(dataretention types.DurationVariant) *_failureStoreLifecycleTemplate { + + s.v.DataRetention = *dataretention.DurationCaster() + + return s +} + +func (s *_failureStoreLifecycleTemplate) Enabled(enabled bool) *_failureStoreLifecycleTemplate { + + s.v.Enabled = &enabled + + return s +} + +func (s *_failureStoreLifecycleTemplate) FailureStoreLifecycleTemplateCaster() *types.FailureStoreLifecycleTemplate { + return s.v +} diff --git a/typedapi/esdsl/featureenabled.go b/typedapi/esdsl/featureenabled.go index 5097b5f0ba..39943545b6 100644 --- a/typedapi/esdsl/featureenabled.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/featureextractor.go b/typedapi/esdsl/featureextractor.go index cdc4e25da3..e8bb44d925 100644 --- a/typedapi/esdsl/featureextractor.go +++ b/typedapi/esdsl/featureextractor.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fieldaliasproperty.go b/typedapi/esdsl/fieldaliasproperty.go index 800c25a60b..b608299526 100644 --- a/typedapi/esdsl/fieldaliasproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fieldandformat.go b/typedapi/esdsl/fieldandformat.go index 19969cd41b..cacaa6041b 100644 --- a/typedapi/esdsl/fieldandformat.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fieldcollapse.go b/typedapi/esdsl/fieldcollapse.go index 63a626d13a..92b73b53dd 100644 --- a/typedapi/esdsl/fieldcollapse.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fielddatafrequencyfilter.go b/typedapi/esdsl/fielddatafrequencyfilter.go index d2dadd7474..6c6f1d02f7 100644 --- a/typedapi/esdsl/fielddatafrequencyfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fielddatemath.go b/typedapi/esdsl/fielddatemath.go index bc269dc2f5..f0d2bf37e2 100644 --- a/typedapi/esdsl/fielddatemath.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fieldlookup.go b/typedapi/esdsl/fieldlookup.go index 37318c26da..736522a845 100644 --- a/typedapi/esdsl/fieldlookup.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fieldmetric.go b/typedapi/esdsl/fieldmetric.go index 4adfb59846..6958a1de94 100644 --- a/typedapi/esdsl/fieldmetric.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fieldnamesfield.go b/typedapi/esdsl/fieldnamesfield.go index 00d5e21d97..e343bd1377 100644 --- a/typedapi/esdsl/fieldnamesfield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fields.go b/typedapi/esdsl/fields.go index e4c0038ca8..0b5d39eecd 100644 --- a/typedapi/esdsl/fields.go +++ b/typedapi/esdsl/fields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fieldsecurity.go b/typedapi/esdsl/fieldsecurity.go index 77e5f7894d..c12b056ea5 100644 --- a/typedapi/esdsl/fieldsecurity.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fieldsort.go b/typedapi/esdsl/fieldsort.go index 49f23af6fc..23690cd65d 100644 --- a/typedapi/esdsl/fieldsort.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fieldsuggester.go b/typedapi/esdsl/fieldsuggester.go index 92e71dc6d0..4626f5b2fc 100644 --- a/typedapi/esdsl/fieldsuggester.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fieldvalue.go b/typedapi/esdsl/fieldvalue.go index c1eb2f6d24..e5c50d5938 100644 --- a/typedapi/esdsl/fieldvalue.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fieldvaluefactorscorefunction.go b/typedapi/esdsl/fieldvaluefactorscorefunction.go index 141c037446..4ec7148e6c 100644 --- a/typedapi/esdsl/fieldvaluefactorscorefunction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fillmaskinferenceoptions.go b/typedapi/esdsl/fillmaskinferenceoptions.go index b6416279fd..02b45256db 100644 --- a/typedapi/esdsl/fillmaskinferenceoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fillmaskinferenceupdateoptions.go b/typedapi/esdsl/fillmaskinferenceupdateoptions.go index c2b446a6ee..c5e232dd9d 100644 --- a/typedapi/esdsl/fillmaskinferenceupdateoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/filteringadvancedsnippet.go b/typedapi/esdsl/filteringadvancedsnippet.go index 528cdd635d..78b7bbaae9 100644 --- a/typedapi/esdsl/filteringadvancedsnippet.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/filteringconfig.go b/typedapi/esdsl/filteringconfig.go index 1132632a70..af1efbdd89 100644 --- a/typedapi/esdsl/filteringconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/filteringrule.go b/typedapi/esdsl/filteringrule.go index dbb5f2096c..20ec6f110b 100644 --- a/typedapi/esdsl/filteringrule.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/filteringrules.go b/typedapi/esdsl/filteringrules.go index 0618cb78b5..098d80f6c0 100644 --- a/typedapi/esdsl/filteringrules.go +++ b/typedapi/esdsl/filteringrules.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/filteringrulesvalidation.go b/typedapi/esdsl/filteringrulesvalidation.go index 59416b50de..61217b7663 100644 --- a/typedapi/esdsl/filteringrulesvalidation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/filteringvalidation.go b/typedapi/esdsl/filteringvalidation.go index a29f6dae7f..eda668681f 100644 --- a/typedapi/esdsl/filteringvalidation.go +++ b/typedapi/esdsl/filteringvalidation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/filterref.go b/typedapi/esdsl/filterref.go index 74c73fc11d..64f5a057dc 100644 --- a/typedapi/esdsl/filterref.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/filtersaggregation.go b/typedapi/esdsl/filtersaggregation.go index 0f0254287f..151e4d10b3 100644 --- a/typedapi/esdsl/filtersaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fingerprintanalyzer.go b/typedapi/esdsl/fingerprintanalyzer.go index 949c03968d..958eb03ed8 100644 --- a/typedapi/esdsl/fingerprintanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -46,9 +46,9 @@ func (s *_fingerprintAnalyzer) Separator(separator string) *_fingerprintAnalyzer return s } -func (s *_fingerprintAnalyzer) Stopwords(stopwords ...string) *_fingerprintAnalyzer { +func (s *_fingerprintAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_fingerprintAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/fingerprintprocessor.go b/typedapi/esdsl/fingerprintprocessor.go index 0892f3323a..3906576187 100644 --- a/typedapi/esdsl/fingerprintprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fingerprinttokenfilter.go b/typedapi/esdsl/fingerprinttokenfilter.go index b03d5e7d90..8dba5f6bc1 100644 --- a/typedapi/esdsl/fingerprinttokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/finnishanalyzer.go b/typedapi/esdsl/finnishanalyzer.go index f128c1ab8c..d49bf44908 100644 --- a/typedapi/esdsl/finnishanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_finnishAnalyzer) StemExclusion(stemexclusions ...string) *_finnishAnal return s } -func (s *_finnishAnalyzer) Stopwords(stopwords ...string) *_finnishAnalyzer { +func (s *_finnishAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_finnishAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/flattenedproperty.go b/typedapi/esdsl/flattenedproperty.go index 6567fb289b..0a595311d0 100644 --- a/typedapi/esdsl/flattenedproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -181,6 +181,16 @@ func (s *_flattenedProperty) SyntheticSourceKeep(syntheticsourcekeep syntheticso return s } +func (s *_flattenedProperty) TimeSeriesDimensions(timeseriesdimensions ...string) *_flattenedProperty { + + for _, v := range timeseriesdimensions { + + s.v.TimeSeriesDimensions = append(s.v.TimeSeriesDimensions, v) + + } + return s +} + func (s *_flattenedProperty) DynamicTemplateCaster() *types.DynamicTemplate { container := types.NewDynamicTemplate() diff --git a/typedapi/esdsl/flattengraphtokenfilter.go b/typedapi/esdsl/flattengraphtokenfilter.go new file mode 100644 index 0000000000..94b77686bf --- /dev/null +++ b/typedapi/esdsl/flattengraphtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _flattenGraphTokenFilter struct { + v *types.FlattenGraphTokenFilter +} + +func NewFlattenGraphTokenFilter() *_flattenGraphTokenFilter { + + return &_flattenGraphTokenFilter{v: types.NewFlattenGraphTokenFilter()} + +} + +func (s *_flattenGraphTokenFilter) Version(versionstring string) *_flattenGraphTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_flattenGraphTokenFilter) FlattenGraphTokenFilterCaster() *types.FlattenGraphTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/floatnumberproperty.go b/typedapi/esdsl/floatnumberproperty.go index a029de1f7c..825f2c7157 100644 --- a/typedapi/esdsl/floatnumberproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/floatrangeproperty.go b/typedapi/esdsl/floatrangeproperty.go index 20ffb69ee7..f6caf4faa4 100644 --- a/typedapi/esdsl/floatrangeproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/forcemergeaction.go b/typedapi/esdsl/forcemergeaction.go index d90f58574e..97ea7f2c88 100644 --- a/typedapi/esdsl/forcemergeaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/foreachprocessor.go b/typedapi/esdsl/foreachprocessor.go index 2d9a85b79b..2589cd2f64 100644 --- a/typedapi/esdsl/foreachprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/frenchanalyzer.go b/typedapi/esdsl/frenchanalyzer.go index 4a08f07930..4fc31c665b 100644 --- a/typedapi/esdsl/frenchanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_frenchAnalyzer) StemExclusion(stemexclusions ...string) *_frenchAnalyz return s } -func (s *_frenchAnalyzer) Stopwords(stopwords ...string) *_frenchAnalyzer { +func (s *_frenchAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_frenchAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/frenchstemtokenfilter.go b/typedapi/esdsl/frenchstemtokenfilter.go new file mode 100644 index 0000000000..5ef1a7743e --- /dev/null +++ b/typedapi/esdsl/frenchstemtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _frenchStemTokenFilter struct { + v *types.FrenchStemTokenFilter +} + +func NewFrenchStemTokenFilter() *_frenchStemTokenFilter { + + return &_frenchStemTokenFilter{v: types.NewFrenchStemTokenFilter()} + +} + +func (s *_frenchStemTokenFilter) Version(versionstring string) *_frenchStemTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_frenchStemTokenFilter) FrenchStemTokenFilterCaster() *types.FrenchStemTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/frequencyencodingpreprocessor.go b/typedapi/esdsl/frequencyencodingpreprocessor.go index 2688efa7fa..18a55996c4 100644 --- a/typedapi/esdsl/frequencyencodingpreprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/frequentitemsetsaggregation.go b/typedapi/esdsl/frequentitemsetsaggregation.go index 223af7d77e..303e0f1e28 100644 --- a/typedapi/esdsl/frequentitemsetsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/frequentitemsetsfield.go b/typedapi/esdsl/frequentitemsetsfield.go index 0102fb95c6..7fc6c3c541 100644 --- a/typedapi/esdsl/frequentitemsetsfield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/functionscore.go b/typedapi/esdsl/functionscore.go index 10f13a0ed0..a907d3f04c 100644 --- a/typedapi/esdsl/functionscore.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/functionscorequery.go b/typedapi/esdsl/functionscorequery.go index 7170a539d4..73aca7d412 100644 --- a/typedapi/esdsl/functionscorequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fuzziness.go b/typedapi/esdsl/fuzziness.go index 90bb8d9c4f..0beab25303 100644 --- a/typedapi/esdsl/fuzziness.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/fuzzyquery.go b/typedapi/esdsl/fuzzyquery.go index 25edee90b8..5a7ccf3e32 100644 --- a/typedapi/esdsl/fuzzyquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/galiciananalyzer.go b/typedapi/esdsl/galiciananalyzer.go index 137b4372bd..ead754d9c6 100644 --- a/typedapi/esdsl/galiciananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_galicianAnalyzer) StemExclusion(stemexclusions ...string) *_galicianAn return s } -func (s *_galicianAnalyzer) Stopwords(stopwords ...string) *_galicianAnalyzer { +func (s *_galicianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_galicianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/gcsrepository.go b/typedapi/esdsl/gcsrepository.go index 0b517d830d..85b216fe83 100644 --- a/typedapi/esdsl/gcsrepository.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/gcsrepositorysettings.go b/typedapi/esdsl/gcsrepositorysettings.go index 1d46de0113..4181277808 100644 --- a/typedapi/esdsl/gcsrepositorysettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geoboundingboxquery.go b/typedapi/esdsl/geoboundingboxquery.go index a92db24a09..b23036d691 100644 --- a/typedapi/esdsl/geoboundingboxquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geobounds.go b/typedapi/esdsl/geobounds.go index a45f2f6d98..e26cce75e5 100644 --- a/typedapi/esdsl/geobounds.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -33,7 +33,7 @@ func NewGeoBounds() *_geoBounds { func (u *_geoBounds) CoordsGeoBounds(coordsgeobounds types.CoordsGeoBoundsVariant) *_geoBounds { - u.v = &coordsgeobounds + u.v = coordsgeobounds.CoordsGeoBoundsCaster() return u } @@ -46,7 +46,7 @@ func (u *_coordsGeoBounds) GeoBoundsCaster() *types.GeoBounds { func (u *_geoBounds) TopLeftBottomRightGeoBounds(topleftbottomrightgeobounds types.TopLeftBottomRightGeoBoundsVariant) *_geoBounds { - u.v = &topleftbottomrightgeobounds + u.v = topleftbottomrightgeobounds.TopLeftBottomRightGeoBoundsCaster() return u } @@ -59,7 +59,7 @@ func (u *_topLeftBottomRightGeoBounds) GeoBoundsCaster() *types.GeoBounds { func (u *_geoBounds) TopRightBottomLeftGeoBounds(toprightbottomleftgeobounds types.TopRightBottomLeftGeoBoundsVariant) *_geoBounds { - u.v = &toprightbottomleftgeobounds + u.v = toprightbottomleftgeobounds.TopRightBottomLeftGeoBoundsCaster() return u } @@ -72,7 +72,7 @@ func (u *_topRightBottomLeftGeoBounds) GeoBoundsCaster() *types.GeoBounds { func (u *_geoBounds) WktGeoBounds(wktgeobounds types.WktGeoBoundsVariant) *_geoBounds { - u.v = &wktgeobounds + u.v = wktgeobounds.WktGeoBoundsCaster() return u } diff --git a/typedapi/esdsl/geoboundsaggregation.go b/typedapi/esdsl/geoboundsaggregation.go index c9a17c5127..e629e77161 100644 --- a/typedapi/esdsl/geoboundsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geocentroidaggregation.go b/typedapi/esdsl/geocentroidaggregation.go index 9b4017567e..b8576e4a12 100644 --- a/typedapi/esdsl/geocentroidaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geodecayfunction.go b/typedapi/esdsl/geodecayfunction.go index c5300efe3c..91898093da 100644 --- a/typedapi/esdsl/geodecayfunction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geodistanceaggregation.go b/typedapi/esdsl/geodistanceaggregation.go index e87a7fc511..9b4fba90aa 100644 --- a/typedapi/esdsl/geodistanceaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geodistancefeaturequery.go b/typedapi/esdsl/geodistancefeaturequery.go index 1fdf3ba56a..d345bd7675 100644 --- a/typedapi/esdsl/geodistancefeaturequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geodistancequery.go b/typedapi/esdsl/geodistancequery.go index 66af5c18d2..d672e6f335 100644 --- a/typedapi/esdsl/geodistancequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geodistancesort.go b/typedapi/esdsl/geodistancesort.go index 5540c7658a..76a5f22678 100644 --- a/typedapi/esdsl/geodistancesort.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geogridprocessor.go b/typedapi/esdsl/geogridprocessor.go index 7c828a6a6e..b290fcdba4 100644 --- a/typedapi/esdsl/geogridprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geogridquery.go b/typedapi/esdsl/geogridquery.go index 9d7b524ee5..6059b27e36 100644 --- a/typedapi/esdsl/geogridquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -53,23 +53,23 @@ func (s *_geoGridQuery) Boost(boost float32) *_geoGridQuery { return s } -func (s *_geoGridQuery) Geogrid(geotile string) *_geoGridQuery { +func (s *_geoGridQuery) Geohash(geohash string) *_geoGridQuery { - s.v.Geogrid = &geotile + s.v.Geohash = &geohash return s } -func (s *_geoGridQuery) Geohash(geohash string) *_geoGridQuery { +func (s *_geoGridQuery) Geohex(geohexcell string) *_geoGridQuery { - s.v.Geohash = &geohash + s.v.Geohex = &geohexcell return s } -func (s *_geoGridQuery) Geohex(geohexcell string) *_geoGridQuery { +func (s *_geoGridQuery) Geotile(geotile string) *_geoGridQuery { - s.v.Geohex = &geohexcell + s.v.Geotile = &geotile return s } diff --git a/typedapi/esdsl/geohashgridaggregation.go b/typedapi/esdsl/geohashgridaggregation.go index 139b0261e0..bbb7729ff9 100644 --- a/typedapi/esdsl/geohashgridaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geohashlocation.go b/typedapi/esdsl/geohashlocation.go index 09432b1ec0..9b17b24e02 100644 --- a/typedapi/esdsl/geohashlocation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geohashprecision.go b/typedapi/esdsl/geohashprecision.go index adced1df0b..f8f1681cb5 100644 --- a/typedapi/esdsl/geohashprecision.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geohexgridaggregation.go b/typedapi/esdsl/geohexgridaggregation.go index f6d02fe9ef..2e4d694fb3 100644 --- a/typedapi/esdsl/geohexgridaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geoipprocessor.go b/typedapi/esdsl/geoipprocessor.go index 834d8733a8..0f4576f819 100644 --- a/typedapi/esdsl/geoipprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geolineaggregation.go b/typedapi/esdsl/geolineaggregation.go index 05cf5dad96..1d8d4417cb 100644 --- a/typedapi/esdsl/geolineaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geolinepoint.go b/typedapi/esdsl/geolinepoint.go index f6701e10c4..04f3c81f43 100644 --- a/typedapi/esdsl/geolinepoint.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geolinesort.go b/typedapi/esdsl/geolinesort.go index ffe66157b0..e03b47519b 100644 --- a/typedapi/esdsl/geolinesort.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geolocation.go b/typedapi/esdsl/geolocation.go index 1dd534c821..070f888baf 100644 --- a/typedapi/esdsl/geolocation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -33,7 +33,7 @@ func NewGeoLocation() *_geoLocation { func (u *_geoLocation) LatLonGeoLocation(latlongeolocation types.LatLonGeoLocationVariant) *_geoLocation { - u.v = &latlongeolocation + u.v = latlongeolocation.LatLonGeoLocationCaster() return u } @@ -46,7 +46,7 @@ func (u *_latLonGeoLocation) GeoLocationCaster() *types.GeoLocation { func (u *_geoLocation) GeoHashLocation(geohashlocation types.GeoHashLocationVariant) *_geoLocation { - u.v = &geohashlocation + u.v = geohashlocation.GeoHashLocationCaster() return u } diff --git a/typedapi/esdsl/geopointproperty.go b/typedapi/esdsl/geopointproperty.go index 523f3b7439..5de53f1551 100644 --- a/typedapi/esdsl/geopointproperty.go +++ b/typedapi/esdsl/geopointproperty.go @@ -16,13 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl import ( "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/dynamicmapping" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/geopointmetrictype" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/onscripterror" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/syntheticsourcekeepenum" ) @@ -181,6 +182,12 @@ func (s *_geoPointProperty) SyntheticSourceKeep(syntheticsourcekeep syntheticsou return s } +func (s *_geoPointProperty) TimeSeriesMetric(timeseriesmetric geopointmetrictype.GeoPointMetricType) *_geoPointProperty { + + s.v.TimeSeriesMetric = ×eriesmetric + return s +} + func (s *_geoPointProperty) DynamicTemplateCaster() *types.DynamicTemplate { container := types.NewDynamicTemplate() diff --git a/typedapi/esdsl/geopolygonpoints.go b/typedapi/esdsl/geopolygonpoints.go index 72856af169..ebb182c222 100644 --- a/typedapi/esdsl/geopolygonpoints.go +++ b/typedapi/esdsl/geopolygonpoints.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geopolygonquery.go b/typedapi/esdsl/geopolygonquery.go index d2b711a782..59d64a1fb9 100644 --- a/typedapi/esdsl/geopolygonquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geoshapefieldquery.go b/typedapi/esdsl/geoshapefieldquery.go index e294f99b76..918dd4c2b7 100644 --- a/typedapi/esdsl/geoshapefieldquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geoshapeproperty.go b/typedapi/esdsl/geoshapeproperty.go index a5d8669dea..f02ac63a12 100644 --- a/typedapi/esdsl/geoshapeproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geoshapequery.go b/typedapi/esdsl/geoshapequery.go index 71456ad3fe..9717a1d1ad 100644 --- a/typedapi/esdsl/geoshapequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/geotilegridaggregation.go b/typedapi/esdsl/geotilegridaggregation.go index ec3020d250..b71ab0fb4b 100644 --- a/typedapi/esdsl/geotilegridaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/germananalyzer.go b/typedapi/esdsl/germananalyzer.go index fc6160dffa..67901f56be 100644 --- a/typedapi/esdsl/germananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_germanAnalyzer) StemExclusion(stemexclusions ...string) *_germanAnalyz return s } -func (s *_germanAnalyzer) Stopwords(stopwords ...string) *_germanAnalyzer { +func (s *_germanAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_germanAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/germannormalizationtokenfilter.go b/typedapi/esdsl/germannormalizationtokenfilter.go new file mode 100644 index 0000000000..366729b516 --- /dev/null +++ b/typedapi/esdsl/germannormalizationtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _germanNormalizationTokenFilter struct { + v *types.GermanNormalizationTokenFilter +} + +func NewGermanNormalizationTokenFilter() *_germanNormalizationTokenFilter { + + return &_germanNormalizationTokenFilter{v: types.NewGermanNormalizationTokenFilter()} + +} + +func (s *_germanNormalizationTokenFilter) Version(versionstring string) *_germanNormalizationTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_germanNormalizationTokenFilter) GermanNormalizationTokenFilterCaster() *types.GermanNormalizationTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/germanstemtokenfilter.go b/typedapi/esdsl/germanstemtokenfilter.go new file mode 100644 index 0000000000..8fb28d56a3 --- /dev/null +++ b/typedapi/esdsl/germanstemtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _germanStemTokenFilter struct { + v *types.GermanStemTokenFilter +} + +func NewGermanStemTokenFilter() *_germanStemTokenFilter { + + return &_germanStemTokenFilter{v: types.NewGermanStemTokenFilter()} + +} + +func (s *_germanStemTokenFilter) Version(versionstring string) *_germanStemTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_germanStemTokenFilter) GermanStemTokenFilterCaster() *types.GermanStemTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/globalaggregation.go b/typedapi/esdsl/globalaggregation.go index e20421bd3a..82e63e1bc8 100644 --- a/typedapi/esdsl/globalaggregation.go +++ b/typedapi/esdsl/globalaggregation.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/globalprivilege.go b/typedapi/esdsl/globalprivilege.go index 856ce9ecc7..d5abacebd0 100644 --- a/typedapi/esdsl/globalprivilege.go +++ b/typedapi/esdsl/globalprivilege.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/googleaistudioservicesettings.go b/typedapi/esdsl/googleaistudioservicesettings.go index 08a71157ca..9cb52a9882 100644 --- a/typedapi/esdsl/googleaistudioservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/googlenormalizeddistanceheuristic.go b/typedapi/esdsl/googlenormalizeddistanceheuristic.go index 7ec90f2e62..3335420451 100644 --- a/typedapi/esdsl/googlenormalizeddistanceheuristic.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/googlevertexaiservicesettings.go b/typedapi/esdsl/googlevertexaiservicesettings.go index 782f9e415a..9cf6fd7150 100644 --- a/typedapi/esdsl/googlevertexaiservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/googlevertexaitasksettings.go b/typedapi/esdsl/googlevertexaitasksettings.go index c7b0d35e32..bd06014466 100644 --- a/typedapi/esdsl/googlevertexaitasksettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/grantapikey.go b/typedapi/esdsl/grantapikey.go index db27980419..75f2cad61b 100644 --- a/typedapi/esdsl/grantapikey.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/greaterthanvalidation.go b/typedapi/esdsl/greaterthanvalidation.go index 7ad67d5605..200ad41619 100644 --- a/typedapi/esdsl/greaterthanvalidation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/greekanalyzer.go b/typedapi/esdsl/greekanalyzer.go index 6a8b2e2802..0152409187 100644 --- a/typedapi/esdsl/greekanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -32,9 +32,9 @@ func NewGreekAnalyzer() *_greekAnalyzer { } -func (s *_greekAnalyzer) Stopwords(stopwords ...string) *_greekAnalyzer { +func (s *_greekAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_greekAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/grokprocessor.go b/typedapi/esdsl/grokprocessor.go index 04968d50eb..fe9a9d51ce 100644 --- a/typedapi/esdsl/grokprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/groupings.go b/typedapi/esdsl/groupings.go index 62d95c63de..c0638ed996 100644 --- a/typedapi/esdsl/groupings.go +++ b/typedapi/esdsl/groupings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/gsubprocessor.go b/typedapi/esdsl/gsubprocessor.go index 01bf0ef00f..f8f846d34e 100644 --- a/typedapi/esdsl/gsubprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/halffloatnumberproperty.go b/typedapi/esdsl/halffloatnumberproperty.go index b0a294d780..af50c127af 100644 --- a/typedapi/esdsl/halffloatnumberproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/haschildquery.go b/typedapi/esdsl/haschildquery.go index 70ba37d05f..04ecd8720b 100644 --- a/typedapi/esdsl/haschildquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/hasparentquery.go b/typedapi/esdsl/hasparentquery.go index c0e293c995..f693a511ff 100644 --- a/typedapi/esdsl/hasparentquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/hdrmethod.go b/typedapi/esdsl/hdrmethod.go index 97010d6981..5de94c24d2 100644 --- a/typedapi/esdsl/hdrmethod.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/highlight.go b/typedapi/esdsl/highlight.go index 689cf81555..7e582917d6 100644 --- a/typedapi/esdsl/highlight.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -75,24 +75,10 @@ func (s *_highlight) Encoder(encoder highlighterencoder.HighlighterEncoder) *_hi return s } -func (s *_highlight) Fields(fields map[string]types.HighlightField) *_highlight { +func (s *_highlight) Fields(fields []map[string]types.HighlightField) *_highlight { s.v.Fields = fields - return s -} - -func (s *_highlight) AddField(key string, value types.HighlightFieldVariant) *_highlight { - - var tmp map[string]types.HighlightField - if s.v.Fields == nil { - s.v.Fields = make(map[string]types.HighlightField) - } else { - tmp = s.v.Fields - } - - tmp[key] = *value.HighlightFieldCaster() - s.v.Fields = tmp return s } diff --git a/typedapi/esdsl/highlightfield.go b/typedapi/esdsl/highlightfield.go index 40193ba297..ff0bb7acb7 100644 --- a/typedapi/esdsl/highlightfield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/hindianalyzer.go b/typedapi/esdsl/hindianalyzer.go index 33a854f566..c1631e8b92 100644 --- a/typedapi/esdsl/hindianalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_hindiAnalyzer) StemExclusion(stemexclusions ...string) *_hindiAnalyzer return s } -func (s *_hindiAnalyzer) Stopwords(stopwords ...string) *_hindiAnalyzer { +func (s *_hindiAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_hindiAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/hindinormalizationtokenfilter.go b/typedapi/esdsl/hindinormalizationtokenfilter.go new file mode 100644 index 0000000000..2f0c029539 --- /dev/null +++ b/typedapi/esdsl/hindinormalizationtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _hindiNormalizationTokenFilter struct { + v *types.HindiNormalizationTokenFilter +} + +func NewHindiNormalizationTokenFilter() *_hindiNormalizationTokenFilter { + + return &_hindiNormalizationTokenFilter{v: types.NewHindiNormalizationTokenFilter()} + +} + +func (s *_hindiNormalizationTokenFilter) Version(versionstring string) *_hindiNormalizationTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_hindiNormalizationTokenFilter) HindiNormalizationTokenFilterCaster() *types.HindiNormalizationTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/hint.go b/typedapi/esdsl/hint.go index f368b0f69d..b291b6d7f6 100644 --- a/typedapi/esdsl/hint.go +++ b/typedapi/esdsl/hint.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/histogramaggregation.go b/typedapi/esdsl/histogramaggregation.go index c1e28201c7..82e685c879 100644 --- a/typedapi/esdsl/histogramaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/histogramgrouping.go b/typedapi/esdsl/histogramgrouping.go index c4befc87e5..70b341e2e0 100644 --- a/typedapi/esdsl/histogramgrouping.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/histogramproperty.go b/typedapi/esdsl/histogramproperty.go index 2adcf6cee0..e997c812ba 100644 --- a/typedapi/esdsl/histogramproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/holtlinearmodelsettings.go b/typedapi/esdsl/holtlinearmodelsettings.go index 8844fb8d82..38d893fe68 100644 --- a/typedapi/esdsl/holtlinearmodelsettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/holtmovingaverageaggregation.go b/typedapi/esdsl/holtmovingaverageaggregation.go index 3042c43397..e88fe087af 100644 --- a/typedapi/esdsl/holtmovingaverageaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/holtwintersmodelsettings.go b/typedapi/esdsl/holtwintersmodelsettings.go index 5a612d9c67..7623804e98 100644 --- a/typedapi/esdsl/holtwintersmodelsettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/holtwintersmovingaverageaggregation.go b/typedapi/esdsl/holtwintersmovingaverageaggregation.go index 24b992efb0..d07355a8d8 100644 --- a/typedapi/esdsl/holtwintersmovingaverageaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/hop.go b/typedapi/esdsl/hop.go index 737f3a5a02..44fb089b2c 100644 --- a/typedapi/esdsl/hop.go +++ b/typedapi/esdsl/hop.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/hourandminute.go b/typedapi/esdsl/hourandminute.go index adb29ad6c4..ca99a8be42 100644 --- a/typedapi/esdsl/hourandminute.go +++ b/typedapi/esdsl/hourandminute.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/hourlyschedule.go b/typedapi/esdsl/hourlyschedule.go index 1ea8c82813..c14146a2a8 100644 --- a/typedapi/esdsl/hourlyschedule.go +++ b/typedapi/esdsl/hourlyschedule.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/htmlstripcharfilter.go b/typedapi/esdsl/htmlstripcharfilter.go index 6fe160b397..8906f9267a 100644 --- a/typedapi/esdsl/htmlstripcharfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/htmlstripprocessor.go b/typedapi/esdsl/htmlstripprocessor.go index fedb3fb08f..87678610db 100644 --- a/typedapi/esdsl/htmlstripprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/httpemailattachment.go b/typedapi/esdsl/httpemailattachment.go index c4fd0397ba..9a092d39ee 100644 --- a/typedapi/esdsl/httpemailattachment.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/httpheaders.go b/typedapi/esdsl/httpheaders.go index c155a402f8..53a7fdffcb 100644 --- a/typedapi/esdsl/httpheaders.go +++ b/typedapi/esdsl/httpheaders.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/httpinput.go b/typedapi/esdsl/httpinput.go index 58d5039b2a..75f2842eaf 100644 --- a/typedapi/esdsl/httpinput.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/httpinputauthentication.go b/typedapi/esdsl/httpinputauthentication.go index 6a26fb86da..f43dd4877c 100644 --- a/typedapi/esdsl/httpinputauthentication.go +++ b/typedapi/esdsl/httpinputauthentication.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/httpinputbasicauthentication.go b/typedapi/esdsl/httpinputbasicauthentication.go index dfb682874e..d75d46ea00 100644 --- a/typedapi/esdsl/httpinputbasicauthentication.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/httpinputproxy.go b/typedapi/esdsl/httpinputproxy.go index 339aa5abdb..a27d20f93f 100644 --- a/typedapi/esdsl/httpinputproxy.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/httpinputrequestdefinition.go b/typedapi/esdsl/httpinputrequestdefinition.go index 3691a1d7ad..e30d3f997f 100644 --- a/typedapi/esdsl/httpinputrequestdefinition.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/huggingfaceservicesettings.go b/typedapi/esdsl/huggingfaceservicesettings.go index 898208db35..7e11fe8610 100644 --- a/typedapi/esdsl/huggingfaceservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -45,6 +45,13 @@ func (s *_huggingFaceServiceSettings) ApiKey(apikey string) *_huggingFaceService return s } +func (s *_huggingFaceServiceSettings) ModelId(modelid string) *_huggingFaceServiceSettings { + + s.v.ModelId = &modelid + + return s +} + func (s *_huggingFaceServiceSettings) RateLimit(ratelimit types.RateLimitSettingVariant) *_huggingFaceServiceSettings { s.v.RateLimit = ratelimit.RateLimitSettingCaster() diff --git a/typedapi/esdsl/huggingfacetasksettings.go b/typedapi/esdsl/huggingfacetasksettings.go new file mode 100644 index 0000000000..7559898c45 --- /dev/null +++ b/typedapi/esdsl/huggingfacetasksettings.go @@ -0,0 +1,51 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _huggingFaceTaskSettings struct { + v *types.HuggingFaceTaskSettings +} + +func NewHuggingFaceTaskSettings() *_huggingFaceTaskSettings { + + return &_huggingFaceTaskSettings{v: types.NewHuggingFaceTaskSettings()} + +} + +func (s *_huggingFaceTaskSettings) ReturnDocuments(returndocuments bool) *_huggingFaceTaskSettings { + + s.v.ReturnDocuments = &returndocuments + + return s +} + +func (s *_huggingFaceTaskSettings) TopN(topn int) *_huggingFaceTaskSettings { + + s.v.TopN = &topn + + return s +} + +func (s *_huggingFaceTaskSettings) HuggingFaceTaskSettingsCaster() *types.HuggingFaceTaskSettings { + return s.v +} diff --git a/typedapi/esdsl/hungariananalyzer.go b/typedapi/esdsl/hungariananalyzer.go index ad52671bad..00326ae38d 100644 --- a/typedapi/esdsl/hungariananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_hungarianAnalyzer) StemExclusion(stemexclusions ...string) *_hungarian return s } -func (s *_hungarianAnalyzer) Stopwords(stopwords ...string) *_hungarianAnalyzer { +func (s *_hungarianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_hungarianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/hunspelltokenfilter.go b/typedapi/esdsl/hunspelltokenfilter.go index acba3250f1..773fdde024 100644 --- a/typedapi/esdsl/hunspelltokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/hyphenationdecompoundertokenfilter.go b/typedapi/esdsl/hyphenationdecompoundertokenfilter.go index 6568a27f77..dfe36a5773 100644 --- a/typedapi/esdsl/hyphenationdecompoundertokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -26,15 +26,19 @@ type _hyphenationDecompounderTokenFilter struct { v *types.HyphenationDecompounderTokenFilter } -func NewHyphenationDecompounderTokenFilter() *_hyphenationDecompounderTokenFilter { +func NewHyphenationDecompounderTokenFilter(hyphenationpatternspath string) *_hyphenationDecompounderTokenFilter { - return &_hyphenationDecompounderTokenFilter{v: types.NewHyphenationDecompounderTokenFilter()} + tmp := &_hyphenationDecompounderTokenFilter{v: types.NewHyphenationDecompounderTokenFilter()} + + tmp.HyphenationPatternsPath(hyphenationpatternspath) + + return tmp } func (s *_hyphenationDecompounderTokenFilter) HyphenationPatternsPath(hyphenationpatternspath string) *_hyphenationDecompounderTokenFilter { - s.v.HyphenationPatternsPath = &hyphenationpatternspath + s.v.HyphenationPatternsPath = hyphenationpatternspath return s } @@ -60,6 +64,20 @@ func (s *_hyphenationDecompounderTokenFilter) MinWordSize(minwordsize int) *_hyp return s } +func (s *_hyphenationDecompounderTokenFilter) NoOverlappingMatches(nooverlappingmatches bool) *_hyphenationDecompounderTokenFilter { + + s.v.NoOverlappingMatches = &nooverlappingmatches + + return s +} + +func (s *_hyphenationDecompounderTokenFilter) NoSubMatches(nosubmatches bool) *_hyphenationDecompounderTokenFilter { + + s.v.NoSubMatches = &nosubmatches + + return s +} + func (s *_hyphenationDecompounderTokenFilter) OnlyLongestMatch(onlylongestmatch bool) *_hyphenationDecompounderTokenFilter { s.v.OnlyLongestMatch = &onlylongestmatch diff --git a/typedapi/esdsl/icuanalyzer.go b/typedapi/esdsl/icuanalyzer.go index f99aad7d8e..5bb1dc4554 100644 --- a/typedapi/esdsl/icuanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/icucollationproperty.go b/typedapi/esdsl/icucollationproperty.go index b95df93273..0f4ec6611f 100644 --- a/typedapi/esdsl/icucollationproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/icucollationtokenfilter.go b/typedapi/esdsl/icucollationtokenfilter.go index 5bff1f216c..95f6ce4153 100644 --- a/typedapi/esdsl/icucollationtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/icufoldingtokenfilter.go b/typedapi/esdsl/icufoldingtokenfilter.go index 4380ce3921..3ae5f455d1 100644 --- a/typedapi/esdsl/icufoldingtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/icunormalizationcharfilter.go b/typedapi/esdsl/icunormalizationcharfilter.go index 76968c2ccf..ddd0d618d6 100644 --- a/typedapi/esdsl/icunormalizationcharfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -48,6 +48,13 @@ func (s *_icuNormalizationCharFilter) Name(name icunormalizationtype.IcuNormaliz return s } +func (s *_icuNormalizationCharFilter) UnicodeSetFilter(unicodesetfilter string) *_icuNormalizationCharFilter { + + s.v.UnicodeSetFilter = &unicodesetfilter + + return s +} + func (s *_icuNormalizationCharFilter) Version(versionstring string) *_icuNormalizationCharFilter { s.v.Version = &versionstring diff --git a/typedapi/esdsl/icunormalizationtokenfilter.go b/typedapi/esdsl/icunormalizationtokenfilter.go index abacbaa3d3..c93de7e8a0 100644 --- a/typedapi/esdsl/icunormalizationtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/icutokenizer.go b/typedapi/esdsl/icutokenizer.go index 0963c972f3..029fbaf5a6 100644 --- a/typedapi/esdsl/icutokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/icutransformtokenfilter.go b/typedapi/esdsl/icutransformtokenfilter.go index 2e6184048f..b947c4816b 100644 --- a/typedapi/esdsl/icutransformtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ids.go b/typedapi/esdsl/ids.go index da10da8de9..3c9cf038fd 100644 --- a/typedapi/esdsl/ids.go +++ b/typedapi/esdsl/ids.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/idsquery.go b/typedapi/esdsl/idsquery.go index e784ce3b39..e9f9e7c5bc 100644 --- a/typedapi/esdsl/idsquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ilmactions.go b/typedapi/esdsl/ilmactions.go index f67810e8b7..f3d08d5de2 100644 --- a/typedapi/esdsl/ilmactions.go +++ b/typedapi/esdsl/ilmactions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ilmpolicy.go b/typedapi/esdsl/ilmpolicy.go index aa5013a580..85e3be199c 100644 --- a/typedapi/esdsl/ilmpolicy.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/includedinvalidation.go b/typedapi/esdsl/includedinvalidation.go index 86f8e27bfd..6a83b3986e 100644 --- a/typedapi/esdsl/includedinvalidation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexaction.go b/typedapi/esdsl/indexaction.go index 4719b3fb60..e2dcc2be63 100644 --- a/typedapi/esdsl/indexaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexanddatastreamaction.go b/typedapi/esdsl/indexanddatastreamaction.go index 617b7f20ee..9283ba85d4 100644 --- a/typedapi/esdsl/indexanddatastreamaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexfield.go b/typedapi/esdsl/indexfield.go index ab6a7701ac..365469f24b 100644 --- a/typedapi/esdsl/indexfield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexingslowlogsettings.go b/typedapi/esdsl/indexingslowlogsettings.go index dcbb41c605..4cd8fc8494 100644 --- a/typedapi/esdsl/indexingslowlogsettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexingslowlogtresholds.go b/typedapi/esdsl/indexingslowlogtresholds.go index c7c91b6d7c..216aa5e05f 100644 --- a/typedapi/esdsl/indexingslowlogtresholds.go +++ b/typedapi/esdsl/indexingslowlogtresholds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexoperation.go b/typedapi/esdsl/indexoperation.go index 5599f9f285..3399e28af7 100644 --- a/typedapi/esdsl/indexoperation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexprivilegescheck.go b/typedapi/esdsl/indexprivilegescheck.go index 29f4c18c56..637082c01c 100644 --- a/typedapi/esdsl/indexprivilegescheck.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexrouting.go b/typedapi/esdsl/indexrouting.go index 58c4ede2e6..e971f1964b 100644 --- a/typedapi/esdsl/indexrouting.go +++ b/typedapi/esdsl/indexrouting.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexroutingallocation.go b/typedapi/esdsl/indexroutingallocation.go index ea87dc52d0..e8c1c4bfe9 100644 --- a/typedapi/esdsl/indexroutingallocation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexroutingallocationdisk.go b/typedapi/esdsl/indexroutingallocationdisk.go index 87390e36e7..2861a44e2b 100644 --- a/typedapi/esdsl/indexroutingallocationdisk.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -34,7 +34,7 @@ func NewIndexRoutingAllocationDisk() *_indexRoutingAllocationDisk { func (s *_indexRoutingAllocationDisk) ThresholdEnabled(thresholdenabled string) *_indexRoutingAllocationDisk { - s.v.ThresholdEnabled = thresholdenabled + s.v.ThresholdEnabled = &thresholdenabled return s } diff --git a/typedapi/esdsl/indexroutingallocationinclude.go b/typedapi/esdsl/indexroutingallocationinclude.go index 140acced2d..4b55569273 100644 --- a/typedapi/esdsl/indexroutingallocationinclude.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexroutingallocationinitialrecovery.go b/typedapi/esdsl/indexroutingallocationinitialrecovery.go index d071b595a9..fceffaacd7 100644 --- a/typedapi/esdsl/indexroutingallocationinitialrecovery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexroutingrebalance.go b/typedapi/esdsl/indexroutingrebalance.go index c06d93a6fd..8cf5620d4d 100644 --- a/typedapi/esdsl/indexroutingrebalance.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexsegmentsort.go b/typedapi/esdsl/indexsegmentsort.go index cc1d5f62d2..2ccd97d4d8 100644 --- a/typedapi/esdsl/indexsegmentsort.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexsettingblocks.go b/typedapi/esdsl/indexsettingblocks.go index f308224f41..ec4a0c358f 100644 --- a/typedapi/esdsl/indexsettingblocks.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexsettings.go b/typedapi/esdsl/indexsettings.go index a5739831dc..0dadd2b307 100644 --- a/typedapi/esdsl/indexsettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -108,7 +108,7 @@ func (s *_indexSettings) FinalPipeline(pipelinename string) *_indexSettings { func (s *_indexSettings) Format(format string) *_indexSettings { - s.v.Format = format + s.v.Format = &format return s } @@ -122,7 +122,7 @@ func (s *_indexSettings) GcDeletes(duration types.DurationVariant) *_indexSettin func (s *_indexSettings) Hidden(hidden string) *_indexSettings { - s.v.Hidden = hidden + s.v.Hidden = &hidden return s } @@ -290,7 +290,7 @@ func (s *_indexSettings) Mode(mode string) *_indexSettings { func (s *_indexSettings) NumberOfReplicas(numberofreplicas string) *_indexSettings { - s.v.NumberOfReplicas = numberofreplicas + s.v.NumberOfReplicas = &numberofreplicas return s } @@ -304,14 +304,14 @@ func (s *_indexSettings) NumberOfRoutingShards(numberofroutingshards int) *_inde func (s *_indexSettings) NumberOfShards(numberofshards string) *_indexSettings { - s.v.NumberOfShards = numberofshards + s.v.NumberOfShards = &numberofshards return s } func (s *_indexSettings) Priority(priority string) *_indexSettings { - s.v.Priority = priority + s.v.Priority = &priority return s } @@ -452,7 +452,7 @@ func (s *_indexSettings) Uuid(uuid string) *_indexSettings { func (s *_indexSettings) VerifiedBeforeClose(verifiedbeforeclose string) *_indexSettings { - s.v.VerifiedBeforeClose = verifiedbeforeclose + s.v.VerifiedBeforeClose = &verifiedbeforeclose return s } diff --git a/typedapi/esdsl/indexsettingsanalysis.go b/typedapi/esdsl/indexsettingsanalysis.go index 7a3716f2d2..c15e2b261b 100644 --- a/typedapi/esdsl/indexsettingsanalysis.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexsettingslifecycle.go b/typedapi/esdsl/indexsettingslifecycle.go index 0d87f10cb8..9673fe8c62 100644 --- a/typedapi/esdsl/indexsettingslifecycle.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -62,7 +62,7 @@ func (s *_indexSettingsLifecycle) ParseOriginationDate(parseoriginationdate bool func (s *_indexSettingsLifecycle) PreferIlm(preferilm string) *_indexSettingsLifecycle { - s.v.PreferIlm = preferilm + s.v.PreferIlm = &preferilm return s } diff --git a/typedapi/esdsl/indexsettingslifecyclestep.go b/typedapi/esdsl/indexsettingslifecyclestep.go index 61a9f6aa6f..2c9fa8da22 100644 --- a/typedapi/esdsl/indexsettingslifecyclestep.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexsettingstimeseries.go b/typedapi/esdsl/indexsettingstimeseries.go index 5f4779692c..1c0b13c86b 100644 --- a/typedapi/esdsl/indexsettingstimeseries.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indexstate.go b/typedapi/esdsl/indexstate.go index 9e62b8a3b6..fccfd475e5 100644 --- a/typedapi/esdsl/indexstate.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indextemplate.go b/typedapi/esdsl/indextemplate.go index e17a28c229..05a200e1a9 100644 --- a/typedapi/esdsl/indextemplate.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indextemplatedatastreamconfiguration.go b/typedapi/esdsl/indextemplatedatastreamconfiguration.go index a5c3e81944..faa39b01b6 100644 --- a/typedapi/esdsl/indextemplatedatastreamconfiguration.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indextemplatemapping.go b/typedapi/esdsl/indextemplatemapping.go index 1301ec33b2..31414b4a6d 100644 --- a/typedapi/esdsl/indextemplatemapping.go +++ b/typedapi/esdsl/indextemplatemapping.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indextemplatesummary.go b/typedapi/esdsl/indextemplatesummary.go index 40f3e2bda7..b266a3cf37 100644 --- a/typedapi/esdsl/indextemplatesummary.go +++ b/typedapi/esdsl/indextemplatesummary.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -53,6 +53,13 @@ func (s *_indexTemplateSummary) AddAlias(key string, value types.AliasVariant) * return s } +func (s *_indexTemplateSummary) DataStreamOptions(datastreamoptions types.DataStreamOptionsTemplateVariant) *_indexTemplateSummary { + + s.v.DataStreamOptions = datastreamoptions.DataStreamOptionsTemplateCaster() + + return s +} + func (s *_indexTemplateSummary) Lifecycle(lifecycle types.DataStreamLifecycleWithRolloverVariant) *_indexTemplateSummary { s.v.Lifecycle = lifecycle.DataStreamLifecycleWithRolloverCaster() diff --git a/typedapi/esdsl/indexversioning.go b/typedapi/esdsl/indexversioning.go index 775384b2e9..fa966809e9 100644 --- a/typedapi/esdsl/indexversioning.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indices.go b/typedapi/esdsl/indices.go index d944d843cf..1aa6891dfe 100644 --- a/typedapi/esdsl/indices.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indicesaction.go b/typedapi/esdsl/indicesaction.go index f6735f7eef..8128cbf85c 100644 --- a/typedapi/esdsl/indicesaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indicesindexingpressure.go b/typedapi/esdsl/indicesindexingpressure.go index 4db498c614..6160bb9cc7 100644 --- a/typedapi/esdsl/indicesindexingpressure.go +++ b/typedapi/esdsl/indicesindexingpressure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indicesindexingpressurememory.go b/typedapi/esdsl/indicesindexingpressurememory.go index 1517948e4f..a4c9d36762 100644 --- a/typedapi/esdsl/indicesindexingpressurememory.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indicesmodifyaction.go b/typedapi/esdsl/indicesmodifyaction.go index f4684f3fa8..05afcbfe2d 100644 --- a/typedapi/esdsl/indicesmodifyaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indicesoptions.go b/typedapi/esdsl/indicesoptions.go index af2db9c4b9..6cb5fbac78 100644 --- a/typedapi/esdsl/indicesoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indicesprivileges.go b/typedapi/esdsl/indicesprivileges.go index 027b2d4611..06e8e244c0 100644 --- a/typedapi/esdsl/indicesprivileges.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/indicesprivilegesquery.go b/typedapi/esdsl/indicesprivilegesquery.go index a5dab30798..c5471d63b1 100644 --- a/typedapi/esdsl/indicesprivilegesquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -40,7 +40,7 @@ func (u *_indicesPrivilegesQuery) String(string string) *_indicesPrivilegesQuery func (u *_indicesPrivilegesQuery) Query(query types.QueryVariant) *_indicesPrivilegesQuery { - u.v = &query + u.v = query.QueryCaster() return u } @@ -53,7 +53,7 @@ func (u *_query) IndicesPrivilegesQueryCaster() *types.IndicesPrivilegesQuery { func (u *_indicesPrivilegesQuery) RoleTemplateQuery(roletemplatequery types.RoleTemplateQueryVariant) *_indicesPrivilegesQuery { - u.v = &roletemplatequery + u.v = roletemplatequery.RoleTemplateQueryCaster() return u } diff --git a/typedapi/esdsl/indicnormalizationtokenfilter.go b/typedapi/esdsl/indicnormalizationtokenfilter.go new file mode 100644 index 0000000000..325565f879 --- /dev/null +++ b/typedapi/esdsl/indicnormalizationtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _indicNormalizationTokenFilter struct { + v *types.IndicNormalizationTokenFilter +} + +func NewIndicNormalizationTokenFilter() *_indicNormalizationTokenFilter { + + return &_indicNormalizationTokenFilter{v: types.NewIndicNormalizationTokenFilter()} + +} + +func (s *_indicNormalizationTokenFilter) Version(versionstring string) *_indicNormalizationTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_indicNormalizationTokenFilter) IndicNormalizationTokenFilterCaster() *types.IndicNormalizationTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/indonesiananalyzer.go b/typedapi/esdsl/indonesiananalyzer.go index 9d09a80536..9e8d6b1a1e 100644 --- a/typedapi/esdsl/indonesiananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_indonesianAnalyzer) StemExclusion(stemexclusions ...string) *_indonesi return s } -func (s *_indonesianAnalyzer) Stopwords(stopwords ...string) *_indonesianAnalyzer { +func (s *_indonesianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_indonesianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/inferenceaggregation.go b/typedapi/esdsl/inferenceaggregation.go index f00b8780a3..14e607da6d 100644 --- a/typedapi/esdsl/inferenceaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/inferencechunkingsettings.go b/typedapi/esdsl/inferencechunkingsettings.go index 22f11bee23..4c5d76d192 100644 --- a/typedapi/esdsl/inferencechunkingsettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/inferenceconfig.go b/typedapi/esdsl/inferenceconfig.go index 0ab8467cfd..87fead6a5e 100644 --- a/typedapi/esdsl/inferenceconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/inferenceconfigclassification.go b/typedapi/esdsl/inferenceconfigclassification.go index 3ac478c7b4..bf76ef4dfb 100644 --- a/typedapi/esdsl/inferenceconfigclassification.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/inferenceconfigcontainer.go b/typedapi/esdsl/inferenceconfigcontainer.go index e5f62783a5..6d2b614508 100644 --- a/typedapi/esdsl/inferenceconfigcontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/inferenceconfigcreatecontainer.go b/typedapi/esdsl/inferenceconfigcreatecontainer.go index fc29e31f99..a20833f4f2 100644 --- a/typedapi/esdsl/inferenceconfigcreatecontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/inferenceconfigregression.go b/typedapi/esdsl/inferenceconfigregression.go index 0589a4a07a..fc47a2a5dd 100644 --- a/typedapi/esdsl/inferenceconfigregression.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/inferenceconfigupdatecontainer.go b/typedapi/esdsl/inferenceconfigupdatecontainer.go index dc435bcac3..cbf24d7afe 100644 --- a/typedapi/esdsl/inferenceconfigupdatecontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/inferenceendpoint.go b/typedapi/esdsl/inferenceendpoint.go index b94ffacffc..91eacf60ea 100644 --- a/typedapi/esdsl/inferenceendpoint.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/inferenceprocessor.go b/typedapi/esdsl/inferenceprocessor.go index e9ea06b7fa..66579d5226 100644 --- a/typedapi/esdsl/inferenceprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ingestpipeline.go b/typedapi/esdsl/ingestpipeline.go index f4793c130e..5433c4add6 100644 --- a/typedapi/esdsl/ingestpipeline.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ingestpipelineparams.go b/typedapi/esdsl/ingestpipelineparams.go index dd19bda076..fb34b79c04 100644 --- a/typedapi/esdsl/ingestpipelineparams.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/innerhits.go b/typedapi/esdsl/innerhits.go index 5261a971da..0c41327d7b 100644 --- a/typedapi/esdsl/innerhits.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -58,8 +58,11 @@ func (s *_innerHits) Explain(explain bool) *_innerHits { func (s *_innerHits) Fields(fields ...string) *_innerHits { - s.v.Fields = fields + for _, v := range fields { + s.v.Fields = append(s.v.Fields, v) + + } return s } diff --git a/typedapi/esdsl/innerretriever.go b/typedapi/esdsl/innerretriever.go new file mode 100644 index 0000000000..51c2d31120 --- /dev/null +++ b/typedapi/esdsl/innerretriever.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/scorenormalizer" +) + +type _innerRetriever struct { + v *types.InnerRetriever +} + +func NewInnerRetriever(normalizer scorenormalizer.ScoreNormalizer, retriever types.RetrieverContainerVariant, weight float32) *_innerRetriever { + + tmp := &_innerRetriever{v: types.NewInnerRetriever()} + + tmp.Normalizer(normalizer) + + tmp.Retriever(retriever) + + tmp.Weight(weight) + + return tmp + +} + +func (s *_innerRetriever) Normalizer(normalizer scorenormalizer.ScoreNormalizer) *_innerRetriever { + + s.v.Normalizer = normalizer + return s +} + +func (s *_innerRetriever) Retriever(retriever types.RetrieverContainerVariant) *_innerRetriever { + + s.v.Retriever = *retriever.RetrieverContainerCaster() + + return s +} + +func (s *_innerRetriever) Weight(weight float32) *_innerRetriever { + + s.v.Weight = weight + + return s +} + +func (s *_innerRetriever) InnerRetrieverCaster() *types.InnerRetriever { + return s.v +} diff --git a/typedapi/esdsl/input.go b/typedapi/esdsl/input.go index a9c5884434..36c77f72a0 100644 --- a/typedapi/esdsl/input.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/inputconfig.go b/typedapi/esdsl/inputconfig.go index 8ed7793023..59cd295593 100644 --- a/typedapi/esdsl/inputconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/integernumberproperty.go b/typedapi/esdsl/integernumberproperty.go index 4b64ae8875..7598781a54 100644 --- a/typedapi/esdsl/integernumberproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/integerrangeproperty.go b/typedapi/esdsl/integerrangeproperty.go index aba08b5802..feee9768ff 100644 --- a/typedapi/esdsl/integerrangeproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/intervals.go b/typedapi/esdsl/intervals.go index 28cd0d32ae..2619911855 100644 --- a/typedapi/esdsl/intervals.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -81,6 +81,20 @@ func (s *_intervals) Prefix(prefix types.IntervalsPrefixVariant) *_intervals { return s } +func (s *_intervals) Range(range_ types.IntervalsRangeVariant) *_intervals { + + s.v.Range = range_.IntervalsRangeCaster() + + return s +} + +func (s *_intervals) Regexp(regexp types.IntervalsRegexpVariant) *_intervals { + + s.v.Regexp = regexp.IntervalsRegexpCaster() + + return s +} + func (s *_intervals) Wildcard(wildcard types.IntervalsWildcardVariant) *_intervals { s.v.Wildcard = wildcard.IntervalsWildcardCaster() diff --git a/typedapi/esdsl/intervalsallof.go b/typedapi/esdsl/intervalsallof.go index dd97b49af8..97b099ce6f 100644 --- a/typedapi/esdsl/intervalsallof.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/intervalsanyof.go b/typedapi/esdsl/intervalsanyof.go index 8d2ee896fd..7a41e8f17b 100644 --- a/typedapi/esdsl/intervalsanyof.go +++ b/typedapi/esdsl/intervalsanyof.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/intervalsfilter.go b/typedapi/esdsl/intervalsfilter.go index f73f36f88b..2c3cd8595e 100644 --- a/typedapi/esdsl/intervalsfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/intervalsfuzzy.go b/typedapi/esdsl/intervalsfuzzy.go index 0a5244915a..d2637af1b0 100644 --- a/typedapi/esdsl/intervalsfuzzy.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/intervalsmatch.go b/typedapi/esdsl/intervalsmatch.go index 1fd730e929..840eaf5924 100644 --- a/typedapi/esdsl/intervalsmatch.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/intervalsprefix.go b/typedapi/esdsl/intervalsprefix.go index d584c14dec..69dc99e1d3 100644 --- a/typedapi/esdsl/intervalsprefix.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/intervalsquery.go b/typedapi/esdsl/intervalsquery.go index c65b7b0d5d..1728a8736d 100644 --- a/typedapi/esdsl/intervalsquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -95,6 +95,20 @@ func (s *_intervalsQuery) QueryName_(queryname_ string) *_intervalsQuery { return s } +func (s *_intervalsQuery) Range(range_ types.IntervalsRangeVariant) *_intervalsQuery { + + s.v.Range = range_.IntervalsRangeCaster() + + return s +} + +func (s *_intervalsQuery) Regexp(regexp types.IntervalsRegexpVariant) *_intervalsQuery { + + s.v.Regexp = regexp.IntervalsRegexpCaster() + + return s +} + func (s *_intervalsQuery) Wildcard(wildcard types.IntervalsWildcardVariant) *_intervalsQuery { s.v.Wildcard = wildcard.IntervalsWildcardCaster() diff --git a/typedapi/esdsl/intervalsrange.go b/typedapi/esdsl/intervalsrange.go new file mode 100644 index 0000000000..71365d64d6 --- /dev/null +++ b/typedapi/esdsl/intervalsrange.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _intervalsRange struct { + v *types.IntervalsRange +} + +func NewIntervalsRange() *_intervalsRange { + + return &_intervalsRange{v: types.NewIntervalsRange()} + +} + +func (s *_intervalsRange) Analyzer(analyzer string) *_intervalsRange { + + s.v.Analyzer = &analyzer + + return s +} + +func (s *_intervalsRange) Gt(gt string) *_intervalsRange { + + s.v.Gt = > + + return s +} + +func (s *_intervalsRange) Gte(gte string) *_intervalsRange { + + s.v.Gte = >e + + return s +} + +func (s *_intervalsRange) Lt(lt string) *_intervalsRange { + + s.v.Lt = < + + return s +} + +func (s *_intervalsRange) Lte(lte string) *_intervalsRange { + + s.v.Lte = <e + + return s +} + +func (s *_intervalsRange) UseField(field string) *_intervalsRange { + + s.v.UseField = &field + + return s +} + +func (s *_intervalsRange) IntervalsCaster() *types.Intervals { + container := types.NewIntervals() + + container.Range = s.v + + return container +} + +func (s *_intervalsRange) IntervalsQueryCaster() *types.IntervalsQuery { + container := types.NewIntervalsQuery() + + container.Range = s.v + + return container +} + +func (s *_intervalsRange) IntervalsRangeCaster() *types.IntervalsRange { + return s.v +} diff --git a/typedapi/esdsl/intervalsregexp.go b/typedapi/esdsl/intervalsregexp.go new file mode 100644 index 0000000000..74e31d5da0 --- /dev/null +++ b/typedapi/esdsl/intervalsregexp.go @@ -0,0 +1,78 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _intervalsRegexp struct { + v *types.IntervalsRegexp +} + +func NewIntervalsRegexp(pattern string) *_intervalsRegexp { + + tmp := &_intervalsRegexp{v: types.NewIntervalsRegexp()} + + tmp.Pattern(pattern) + + return tmp + +} + +func (s *_intervalsRegexp) Analyzer(analyzer string) *_intervalsRegexp { + + s.v.Analyzer = &analyzer + + return s +} + +func (s *_intervalsRegexp) Pattern(pattern string) *_intervalsRegexp { + + s.v.Pattern = pattern + + return s +} + +func (s *_intervalsRegexp) UseField(field string) *_intervalsRegexp { + + s.v.UseField = &field + + return s +} + +func (s *_intervalsRegexp) IntervalsCaster() *types.Intervals { + container := types.NewIntervals() + + container.Regexp = s.v + + return container +} + +func (s *_intervalsRegexp) IntervalsQueryCaster() *types.IntervalsQuery { + container := types.NewIntervalsQuery() + + container.Regexp = s.v + + return container +} + +func (s *_intervalsRegexp) IntervalsRegexpCaster() *types.IntervalsRegexp { + return s.v +} diff --git a/typedapi/esdsl/intervalswildcard.go b/typedapi/esdsl/intervalswildcard.go index 83e5adfd57..28fe062374 100644 --- a/typedapi/esdsl/intervalswildcard.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ipinfo.go b/typedapi/esdsl/ipinfo.go index d5d51a2043..df6d01c579 100644 --- a/typedapi/esdsl/ipinfo.go +++ b/typedapi/esdsl/ipinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/iplocationprocessor.go b/typedapi/esdsl/iplocationprocessor.go index cafcacbaa7..7a89712337 100644 --- a/typedapi/esdsl/iplocationprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ipprefixaggregation.go b/typedapi/esdsl/ipprefixaggregation.go index a2e36b07ea..373aac7a55 100644 --- a/typedapi/esdsl/ipprefixaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ipproperty.go b/typedapi/esdsl/ipproperty.go index feb36bade1..2a0371c583 100644 --- a/typedapi/esdsl/ipproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/iprangeaggregation.go b/typedapi/esdsl/iprangeaggregation.go index d906b42268..e663f8463c 100644 --- a/typedapi/esdsl/iprangeaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/iprangeaggregationrange.go b/typedapi/esdsl/iprangeaggregationrange.go index 99b549819e..ab335a6ee7 100644 --- a/typedapi/esdsl/iprangeaggregationrange.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/iprangeproperty.go b/typedapi/esdsl/iprangeproperty.go index 73e31786cb..efcaf861d8 100644 --- a/typedapi/esdsl/iprangeproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/irishanalyzer.go b/typedapi/esdsl/irishanalyzer.go index 96e5f861bf..88d15d3346 100644 --- a/typedapi/esdsl/irishanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_irishAnalyzer) StemExclusion(stemexclusions ...string) *_irishAnalyzer return s } -func (s *_irishAnalyzer) Stopwords(stopwords ...string) *_irishAnalyzer { +func (s *_irishAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_irishAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/italiananalyzer.go b/typedapi/esdsl/italiananalyzer.go index ebc8c6a18d..2a3ecb7f11 100644 --- a/typedapi/esdsl/italiananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_italianAnalyzer) StemExclusion(stemexclusions ...string) *_italianAnal return s } -func (s *_italianAnalyzer) Stopwords(stopwords ...string) *_italianAnalyzer { +func (s *_italianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_italianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/jastoptokenfilter.go b/typedapi/esdsl/jastoptokenfilter.go new file mode 100644 index 0000000000..b092ae76fe --- /dev/null +++ b/typedapi/esdsl/jastoptokenfilter.go @@ -0,0 +1,51 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _jaStopTokenFilter struct { + v *types.JaStopTokenFilter +} + +func NewJaStopTokenFilter() *_jaStopTokenFilter { + + return &_jaStopTokenFilter{v: types.NewJaStopTokenFilter()} + +} + +func (s *_jaStopTokenFilter) Stopwords(stopwords types.StopWordsVariant) *_jaStopTokenFilter { + + s.v.Stopwords = *stopwords.StopWordsCaster() + + return s +} + +func (s *_jaStopTokenFilter) Version(versionstring string) *_jaStopTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_jaStopTokenFilter) JaStopTokenFilterCaster() *types.JaStopTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/jinaaiservicesettings.go b/typedapi/esdsl/jinaaiservicesettings.go index a1fb14cf10..c94342062b 100644 --- a/typedapi/esdsl/jinaaiservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/jinaaitasksettings.go b/typedapi/esdsl/jinaaitasksettings.go index cf1ffa2876..86723ec2ed 100644 --- a/typedapi/esdsl/jinaaitasksettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/jobconfig.go b/typedapi/esdsl/jobconfig.go index 24fe23074b..5dd563b1dd 100644 --- a/typedapi/esdsl/jobconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/joinprocessor.go b/typedapi/esdsl/joinprocessor.go index b207a4fe02..24e7fee7f6 100644 --- a/typedapi/esdsl/joinprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/joinproperty.go b/typedapi/esdsl/joinproperty.go index 558b310542..51fe7a67d0 100644 --- a/typedapi/esdsl/joinproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/jsonprocessor.go b/typedapi/esdsl/jsonprocessor.go index b763093b2d..2c30fc99bd 100644 --- a/typedapi/esdsl/jsonprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/keeptypestokenfilter.go b/typedapi/esdsl/keeptypestokenfilter.go index 8e85227342..a04e54f825 100644 --- a/typedapi/esdsl/keeptypestokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/keepwordstokenfilter.go b/typedapi/esdsl/keepwordstokenfilter.go index 9fc325ffd5..2ee2dd84c4 100644 --- a/typedapi/esdsl/keepwordstokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/keyvalueprocessor.go b/typedapi/esdsl/keyvalueprocessor.go index ba1b32878b..71855eb960 100644 --- a/typedapi/esdsl/keyvalueprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/keywordanalyzer.go b/typedapi/esdsl/keywordanalyzer.go index 13b9cf7699..72eb34681f 100644 --- a/typedapi/esdsl/keywordanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/keywordmarkertokenfilter.go b/typedapi/esdsl/keywordmarkertokenfilter.go index a03b421994..ec0a0acdf4 100644 --- a/typedapi/esdsl/keywordmarkertokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/keywordproperty.go b/typedapi/esdsl/keywordproperty.go index 021ad318f5..27fa0829f3 100644 --- a/typedapi/esdsl/keywordproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/keywordrepeattokenfilter.go b/typedapi/esdsl/keywordrepeattokenfilter.go new file mode 100644 index 0000000000..9fde5435a8 --- /dev/null +++ b/typedapi/esdsl/keywordrepeattokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _keywordRepeatTokenFilter struct { + v *types.KeywordRepeatTokenFilter +} + +func NewKeywordRepeatTokenFilter() *_keywordRepeatTokenFilter { + + return &_keywordRepeatTokenFilter{v: types.NewKeywordRepeatTokenFilter()} + +} + +func (s *_keywordRepeatTokenFilter) Version(versionstring string) *_keywordRepeatTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_keywordRepeatTokenFilter) KeywordRepeatTokenFilterCaster() *types.KeywordRepeatTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/keywordtokenizer.go b/typedapi/esdsl/keywordtokenizer.go index f20d7e59a0..2c83553bb9 100644 --- a/typedapi/esdsl/keywordtokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/knnquery.go b/typedapi/esdsl/knnquery.go index 6adb437f9e..727f8f565c 100644 --- a/typedapi/esdsl/knnquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/knnretriever.go b/typedapi/esdsl/knnretriever.go index 1b7608b3a8..8304d7fd65 100644 --- a/typedapi/esdsl/knnretriever.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -72,6 +72,13 @@ func (s *_knnRetriever) MinScore(minscore float32) *_knnRetriever { return s } +func (s *_knnRetriever) Name_(name_ string) *_knnRetriever { + + s.v.Name_ = &name_ + + return s +} + func (s *_knnRetriever) NumCandidates(numcandidates int) *_knnRetriever { s.v.NumCandidates = numcandidates diff --git a/typedapi/esdsl/knnsearch.go b/typedapi/esdsl/knnsearch.go index e708b36ac0..19f95bd574 100644 --- a/typedapi/esdsl/knnsearch.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/kstemtokenfilter.go b/typedapi/esdsl/kstemtokenfilter.go index 27136852d8..ce58fad60e 100644 --- a/typedapi/esdsl/kstemtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/kuromojianalyzer.go b/typedapi/esdsl/kuromojianalyzer.go index 1a6847b55d..38bc58f847 100644 --- a/typedapi/esdsl/kuromojianalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/kuromojiiterationmarkcharfilter.go b/typedapi/esdsl/kuromojiiterationmarkcharfilter.go index 1a745ec752..9be9871d50 100644 --- a/typedapi/esdsl/kuromojiiterationmarkcharfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/kuromojipartofspeechtokenfilter.go b/typedapi/esdsl/kuromojipartofspeechtokenfilter.go index fe2b101964..7b1fcd2906 100644 --- a/typedapi/esdsl/kuromojipartofspeechtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/kuromojireadingformtokenfilter.go b/typedapi/esdsl/kuromojireadingformtokenfilter.go index 69c4cb9b5f..81b6a3b9c7 100644 --- a/typedapi/esdsl/kuromojireadingformtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/kuromojistemmertokenfilter.go b/typedapi/esdsl/kuromojistemmertokenfilter.go index b3f64c1568..1aaaf7d76d 100644 --- a/typedapi/esdsl/kuromojistemmertokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/kuromojitokenizer.go b/typedapi/esdsl/kuromojitokenizer.go index 7d865f425b..406f4efecf 100644 --- a/typedapi/esdsl/kuromojitokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/laplacesmoothingmodel.go b/typedapi/esdsl/laplacesmoothingmodel.go index 009960b538..f6cd38e31f 100644 --- a/typedapi/esdsl/laplacesmoothingmodel.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/latest.go b/typedapi/esdsl/latest.go index c9e2c13d9c..6ac80db3dc 100644 --- a/typedapi/esdsl/latest.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/latlongeolocation.go b/typedapi/esdsl/latlongeolocation.go index 6e1490d866..ac31c9b70f 100644 --- a/typedapi/esdsl/latlongeolocation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/latviananalyzer.go b/typedapi/esdsl/latviananalyzer.go index 76241aa12d..245d267291 100644 --- a/typedapi/esdsl/latviananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_latvianAnalyzer) StemExclusion(stemexclusions ...string) *_latvianAnal return s } -func (s *_latvianAnalyzer) Stopwords(stopwords ...string) *_latvianAnalyzer { +func (s *_latvianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_latvianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/learningtorank.go b/typedapi/esdsl/learningtorank.go index ffa88e6622..a8e4a396b0 100644 --- a/typedapi/esdsl/learningtorank.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/learningtorankconfig.go b/typedapi/esdsl/learningtorankconfig.go index a035ddbfa4..cfd459cbcb 100644 --- a/typedapi/esdsl/learningtorankconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/lengthtokenfilter.go b/typedapi/esdsl/lengthtokenfilter.go index 3f7c0fe38c..8b4891d03f 100644 --- a/typedapi/esdsl/lengthtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/lessthanvalidation.go b/typedapi/esdsl/lessthanvalidation.go index 57a4a61407..ad817761f5 100644 --- a/typedapi/esdsl/lessthanvalidation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/lettertokenizer.go b/typedapi/esdsl/lettertokenizer.go index e437c7263d..eae8c4906c 100644 --- a/typedapi/esdsl/lettertokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/license.go b/typedapi/esdsl/license.go index 2b0f82c933..d64c5dcbc8 100644 --- a/typedapi/esdsl/license.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/like.go b/typedapi/esdsl/like.go index 49544c4f86..8545b91f6b 100644 --- a/typedapi/esdsl/like.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -40,7 +40,7 @@ func (u *_like) String(string string) *_like { func (u *_like) LikeDocument(likedocument types.LikeDocumentVariant) *_like { - u.v = &likedocument + u.v = likedocument.LikeDocumentCaster() return u } diff --git a/typedapi/esdsl/likedocument.go b/typedapi/esdsl/likedocument.go index 372afb92e5..e2e149e8b0 100644 --- a/typedapi/esdsl/likedocument.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/limittokencounttokenfilter.go b/typedapi/esdsl/limittokencounttokenfilter.go index 1691531fa8..57d3245135 100644 --- a/typedapi/esdsl/limittokencounttokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/linearinterpolationsmoothingmodel.go b/typedapi/esdsl/linearinterpolationsmoothingmodel.go index 7c4fa9abd9..58f2dfda8f 100644 --- a/typedapi/esdsl/linearinterpolationsmoothingmodel.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/linearmovingaverageaggregation.go b/typedapi/esdsl/linearmovingaverageaggregation.go index 4bf548297f..c47e3eb04c 100644 --- a/typedapi/esdsl/linearmovingaverageaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/linearretriever.go b/typedapi/esdsl/linearretriever.go new file mode 100644 index 0000000000..0e16151b90 --- /dev/null +++ b/typedapi/esdsl/linearretriever.go @@ -0,0 +1,114 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/scorenormalizer" +) + +type _linearRetriever struct { + v *types.LinearRetriever +} + +// A retriever that supports the combination of different retrievers through a +// weighted linear combination. +func NewLinearRetriever() *_linearRetriever { + + return &_linearRetriever{v: types.NewLinearRetriever()} + +} + +func (s *_linearRetriever) Fields(fields ...string) *_linearRetriever { + + for _, v := range fields { + + s.v.Fields = append(s.v.Fields, v) + + } + return s +} + +func (s *_linearRetriever) Filter(filters ...types.QueryVariant) *_linearRetriever { + + s.v.Filter = make([]types.Query, len(filters)) + for i, v := range filters { + s.v.Filter[i] = *v.QueryCaster() + } + + return s +} + +func (s *_linearRetriever) MinScore(minscore float32) *_linearRetriever { + + s.v.MinScore = &minscore + + return s +} + +func (s *_linearRetriever) Name_(name_ string) *_linearRetriever { + + s.v.Name_ = &name_ + + return s +} + +func (s *_linearRetriever) Normalizer(normalizer scorenormalizer.ScoreNormalizer) *_linearRetriever { + + s.v.Normalizer = &normalizer + return s +} + +func (s *_linearRetriever) Query(query string) *_linearRetriever { + + s.v.Query = &query + + return s +} + +func (s *_linearRetriever) RankWindowSize(rankwindowsize int) *_linearRetriever { + + s.v.RankWindowSize = &rankwindowsize + + return s +} + +func (s *_linearRetriever) Retrievers(retrievers ...types.InnerRetrieverVariant) *_linearRetriever { + + for _, v := range retrievers { + + s.v.Retrievers = append(s.v.Retrievers, *v.InnerRetrieverCaster()) + + } + return s +} + +func (s *_linearRetriever) RetrieverContainerCaster() *types.RetrieverContainer { + container := types.NewRetrieverContainer() + + container.Linear = s.v + + return container +} + +func (s *_linearRetriever) LinearRetrieverCaster() *types.LinearRetriever { + return s.v +} diff --git a/typedapi/esdsl/listtypevalidation.go b/typedapi/esdsl/listtypevalidation.go index 1afdfdb1b8..6b0d3e4487 100644 --- a/typedapi/esdsl/listtypevalidation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/lithuaniananalyzer.go b/typedapi/esdsl/lithuaniananalyzer.go index ee3eb9ea52..b791f09573 100644 --- a/typedapi/esdsl/lithuaniananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_lithuanianAnalyzer) StemExclusion(stemexclusions ...string) *_lithuani return s } -func (s *_lithuanianAnalyzer) Stopwords(stopwords ...string) *_lithuanianAnalyzer { +func (s *_lithuanianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_lithuanianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/loggingaction.go b/typedapi/esdsl/loggingaction.go index 755919e740..3d3b7787e5 100644 --- a/typedapi/esdsl/loggingaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/logstashpipeline.go b/typedapi/esdsl/logstashpipeline.go index 2402e0e63b..ca40c46562 100644 --- a/typedapi/esdsl/logstashpipeline.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/longnumberproperty.go b/typedapi/esdsl/longnumberproperty.go index 9aee8291f5..4fa61ed49f 100644 --- a/typedapi/esdsl/longnumberproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/longrangeproperty.go b/typedapi/esdsl/longrangeproperty.go index 057408911a..944645381f 100644 --- a/typedapi/esdsl/longrangeproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/lowercasenormalizer.go b/typedapi/esdsl/lowercasenormalizer.go index f9e04b05c0..82bbbab958 100644 --- a/typedapi/esdsl/lowercasenormalizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/lowercaseprocessor.go b/typedapi/esdsl/lowercaseprocessor.go index 94c12ff30d..b5345450e6 100644 --- a/typedapi/esdsl/lowercaseprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/lowercasetokenfilter.go b/typedapi/esdsl/lowercasetokenfilter.go index 8f6ee39d3b..8789553beb 100644 --- a/typedapi/esdsl/lowercasetokenfilter.go +++ b/typedapi/esdsl/lowercasetokenfilter.go @@ -16,11 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl -import "github.com/elastic/go-elasticsearch/v9/typedapi/types" +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/lowercasetokenfilterlanguages" +) type _lowercaseTokenFilter struct { v *types.LowercaseTokenFilter @@ -32,10 +35,9 @@ func NewLowercaseTokenFilter() *_lowercaseTokenFilter { } -func (s *_lowercaseTokenFilter) Language(language string) *_lowercaseTokenFilter { +func (s *_lowercaseTokenFilter) Language(language lowercasetokenfilterlanguages.LowercaseTokenFilterLanguages) *_lowercaseTokenFilter { s.v.Language = &language - return s } diff --git a/typedapi/esdsl/lowercasetokenizer.go b/typedapi/esdsl/lowercasetokenizer.go index defe5d40fe..323dc32d2d 100644 --- a/typedapi/esdsl/lowercasetokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/manageuserprivileges.go b/typedapi/esdsl/manageuserprivileges.go index 3664e3ada1..960bdd54aa 100644 --- a/typedapi/esdsl/manageuserprivileges.go +++ b/typedapi/esdsl/manageuserprivileges.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/mappingcharfilter.go b/typedapi/esdsl/mappingcharfilter.go index 58ccbfa58c..0db3dd9cf7 100644 --- a/typedapi/esdsl/mappingcharfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/mappinglimitsettings.go b/typedapi/esdsl/mappinglimitsettings.go index e22f297f2b..ecc9700134 100644 --- a/typedapi/esdsl/mappinglimitsettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -62,7 +62,7 @@ func (s *_mappingLimitSettings) FieldNameLength(fieldnamelength types.MappingLim func (s *_mappingLimitSettings) IgnoreMalformed(ignoremalformed string) *_mappingLimitSettings { - s.v.IgnoreMalformed = ignoremalformed + s.v.IgnoreMalformed = &ignoremalformed return s } diff --git a/typedapi/esdsl/mappinglimitsettingsdepth.go b/typedapi/esdsl/mappinglimitsettingsdepth.go index b199158a4d..c7d8eb81c5 100644 --- a/typedapi/esdsl/mappinglimitsettingsdepth.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingsdimensionfields.go b/typedapi/esdsl/mappinglimitsettingsdimensionfields.go index 219402b19d..7f77edb45f 100644 --- a/typedapi/esdsl/mappinglimitsettingsdimensionfields.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingsfieldnamelength.go b/typedapi/esdsl/mappinglimitsettingsfieldnamelength.go index 95e8d4d74c..a3c4d5bed5 100644 --- a/typedapi/esdsl/mappinglimitsettingsfieldnamelength.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingsnestedfields.go b/typedapi/esdsl/mappinglimitsettingsnestedfields.go index bab34cc117..447f222dc4 100644 --- a/typedapi/esdsl/mappinglimitsettingsnestedfields.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingsnestedobjects.go b/typedapi/esdsl/mappinglimitsettingsnestedobjects.go index 4bdf9fea7b..d69c7577d0 100644 --- a/typedapi/esdsl/mappinglimitsettingsnestedobjects.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingssourcefields.go b/typedapi/esdsl/mappinglimitsettingssourcefields.go index 0ab55ef0ee..99a9ad10ac 100644 --- a/typedapi/esdsl/mappinglimitsettingssourcefields.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/mappinglimitsettingstotalfields.go b/typedapi/esdsl/mappinglimitsettingstotalfields.go index 73e760246c..862a5d2749 100644 --- a/typedapi/esdsl/mappinglimitsettingstotalfields.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -34,14 +34,14 @@ func NewMappingLimitSettingsTotalFields() *_mappingLimitSettingsTotalFields { func (s *_mappingLimitSettingsTotalFields) IgnoreDynamicBeyondLimit(ignoredynamicbeyondlimit string) *_mappingLimitSettingsTotalFields { - s.v.IgnoreDynamicBeyondLimit = ignoredynamicbeyondlimit + s.v.IgnoreDynamicBeyondLimit = &ignoredynamicbeyondlimit return s } func (s *_mappingLimitSettingsTotalFields) Limit(limit string) *_mappingLimitSettingsTotalFields { - s.v.Limit = limit + s.v.Limit = &limit return s } diff --git a/typedapi/esdsl/matchallquery.go b/typedapi/esdsl/matchallquery.go index 05cd8f74ab..0f1f14b23e 100644 --- a/typedapi/esdsl/matchallquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -26,7 +26,7 @@ type _matchAllQuery struct { v *types.MatchAllQuery } -// Matches all documents, giving them all a `_score` of 1.0. +// Matches all roles, giving them all a `_score` of 1.0. func NewMatchAllQuery() *_matchAllQuery { return &_matchAllQuery{v: types.NewMatchAllQuery()} diff --git a/typedapi/esdsl/matchboolprefixquery.go b/typedapi/esdsl/matchboolprefixquery.go index dd40d5086e..53b1707c3d 100644 --- a/typedapi/esdsl/matchboolprefixquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/matchnonequery.go b/typedapi/esdsl/matchnonequery.go index e4c781b881..73d3e98968 100644 --- a/typedapi/esdsl/matchnonequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/matchonlytextproperty.go b/typedapi/esdsl/matchonlytextproperty.go index 48880b6e59..6d67af4e75 100644 --- a/typedapi/esdsl/matchonlytextproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/matchphraseprefixquery.go b/typedapi/esdsl/matchphraseprefixquery.go index 91ad9aa9b5..3d66608dad 100644 --- a/typedapi/esdsl/matchphraseprefixquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/matchphrasequery.go b/typedapi/esdsl/matchphrasequery.go index ea98f0e638..ad6510ccde 100644 --- a/typedapi/esdsl/matchphrasequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/matchquery.go b/typedapi/esdsl/matchquery.go index 6e0b7f3b5a..54d72f99a7 100644 --- a/typedapi/esdsl/matchquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/matrixstatsaggregation.go b/typedapi/esdsl/matrixstatsaggregation.go index 0057c9be5b..efdc16b77d 100644 --- a/typedapi/esdsl/matrixstatsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/maxaggregation.go b/typedapi/esdsl/maxaggregation.go index 14910840be..349c968b59 100644 --- a/typedapi/esdsl/maxaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/maxbucketaggregation.go b/typedapi/esdsl/maxbucketaggregation.go index 19435d90b8..ffd7a4506d 100644 --- a/typedapi/esdsl/maxbucketaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/maxmind.go b/typedapi/esdsl/maxmind.go index 685c9d64e6..48e9dba556 100644 --- a/typedapi/esdsl/maxmind.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/medianabsolutedeviationaggregation.go b/typedapi/esdsl/medianabsolutedeviationaggregation.go index ac456e2415..0e430c9f3c 100644 --- a/typedapi/esdsl/medianabsolutedeviationaggregation.go +++ b/typedapi/esdsl/medianabsolutedeviationaggregation.go @@ -16,11 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl -import "github.com/elastic/go-elasticsearch/v9/typedapi/types" +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tdigestexecutionhint" +) type _medianAbsoluteDeviationAggregation struct { v *types.MedianAbsoluteDeviationAggregation @@ -41,6 +44,12 @@ func (s *_medianAbsoluteDeviationAggregation) Compression(compression types.Floa return s } +func (s *_medianAbsoluteDeviationAggregation) ExecutionHint(executionhint tdigestexecutionhint.TDigestExecutionHint) *_medianAbsoluteDeviationAggregation { + + s.v.ExecutionHint = &executionhint + return s +} + func (s *_medianAbsoluteDeviationAggregation) Field(field string) *_medianAbsoluteDeviationAggregation { s.v.Field = &field diff --git a/typedapi/esdsl/merge.go b/typedapi/esdsl/merge.go index aa4186e6a2..17f58d5487 100644 --- a/typedapi/esdsl/merge.go +++ b/typedapi/esdsl/merge.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/mergescheduler.go b/typedapi/esdsl/mergescheduler.go index 0fba1af761..ff3b648ad7 100644 --- a/typedapi/esdsl/mergescheduler.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/message.go b/typedapi/esdsl/message.go index 8c3f01de40..867c7bf4cd 100644 --- a/typedapi/esdsl/message.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/messagecontent.go b/typedapi/esdsl/messagecontent.go index 6566077595..2afd1fb5cf 100644 --- a/typedapi/esdsl/messagecontent.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/metadata.go b/typedapi/esdsl/metadata.go index af5ce0a715..ecea4231fd 100644 --- a/typedapi/esdsl/metadata.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/mgetoperation.go b/typedapi/esdsl/mgetoperation.go index 2c3392d9a5..6e2c40ab3b 100644 --- a/typedapi/esdsl/mgetoperation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/migrateaction.go b/typedapi/esdsl/migrateaction.go index fc9112f141..f9ac613c8d 100644 --- a/typedapi/esdsl/migrateaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/migratereindex.go b/typedapi/esdsl/migratereindex.go index df30b104ff..9add8087e8 100644 --- a/typedapi/esdsl/migratereindex.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/minaggregation.go b/typedapi/esdsl/minaggregation.go index 58cd6435c5..45e6335c21 100644 --- a/typedapi/esdsl/minaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/minbucketaggregation.go b/typedapi/esdsl/minbucketaggregation.go index bc22c14d10..9b3e3bd74a 100644 --- a/typedapi/esdsl/minbucketaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/minhashtokenfilter.go b/typedapi/esdsl/minhashtokenfilter.go new file mode 100644 index 0000000000..0244929aa0 --- /dev/null +++ b/typedapi/esdsl/minhashtokenfilter.go @@ -0,0 +1,72 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _minHashTokenFilter struct { + v *types.MinHashTokenFilter +} + +func NewMinHashTokenFilter() *_minHashTokenFilter { + + return &_minHashTokenFilter{v: types.NewMinHashTokenFilter()} + +} + +func (s *_minHashTokenFilter) BucketCount(bucketcount int) *_minHashTokenFilter { + + s.v.BucketCount = &bucketcount + + return s +} + +func (s *_minHashTokenFilter) HashCount(hashcount int) *_minHashTokenFilter { + + s.v.HashCount = &hashcount + + return s +} + +func (s *_minHashTokenFilter) HashSetSize(hashsetsize int) *_minHashTokenFilter { + + s.v.HashSetSize = &hashsetsize + + return s +} + +func (s *_minHashTokenFilter) Version(versionstring string) *_minHashTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_minHashTokenFilter) WithRotation(withrotation bool) *_minHashTokenFilter { + + s.v.WithRotation = &withrotation + + return s +} + +func (s *_minHashTokenFilter) MinHashTokenFilterCaster() *types.MinHashTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/minimumshouldmatch.go b/typedapi/esdsl/minimumshouldmatch.go index fa1d362059..b6974b6137 100644 --- a/typedapi/esdsl/minimumshouldmatch.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/missing.go b/typedapi/esdsl/missing.go index 2d5cb5d47b..23efbae2f8 100644 --- a/typedapi/esdsl/missing.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/missingaggregation.go b/typedapi/esdsl/missingaggregation.go index c450995d77..45dfb8cbe6 100644 --- a/typedapi/esdsl/missingaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/mistralservicesettings.go b/typedapi/esdsl/mistralservicesettings.go index 7299f23bc3..269c02d2ac 100644 --- a/typedapi/esdsl/mistralservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/modelplotconfig.go b/typedapi/esdsl/modelplotconfig.go index 1b9149c885..0e1b062aa0 100644 --- a/typedapi/esdsl/modelplotconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/morelikethisquery.go b/typedapi/esdsl/morelikethisquery.go index f02968af03..ed3be1fc5d 100644 --- a/typedapi/esdsl/morelikethisquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -154,9 +154,9 @@ func (s *_moreLikeThisQuery) Routing(routing string) *_moreLikeThisQuery { return s } -func (s *_moreLikeThisQuery) StopWords(stopwords ...string) *_moreLikeThisQuery { +func (s *_moreLikeThisQuery) StopWords(stopwords types.StopWordsVariant) *_moreLikeThisQuery { - s.v.StopWords = stopwords + s.v.StopWords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/movingaverageaggregation.go b/typedapi/esdsl/movingaverageaggregation.go index 69614a42c1..95caafbd28 100644 --- a/typedapi/esdsl/movingaverageaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -33,7 +33,7 @@ func NewMovingAverageAggregation() *_movingAverageAggregation { func (u *_movingAverageAggregation) LinearMovingAverageAggregation(linearmovingaverageaggregation types.LinearMovingAverageAggregationVariant) *_movingAverageAggregation { - u.v = &linearmovingaverageaggregation + u.v = linearmovingaverageaggregation.LinearMovingAverageAggregationCaster() return u } @@ -46,7 +46,7 @@ func (u *_linearMovingAverageAggregation) MovingAverageAggregationCaster() *type func (u *_movingAverageAggregation) SimpleMovingAverageAggregation(simplemovingaverageaggregation types.SimpleMovingAverageAggregationVariant) *_movingAverageAggregation { - u.v = &simplemovingaverageaggregation + u.v = simplemovingaverageaggregation.SimpleMovingAverageAggregationCaster() return u } @@ -59,7 +59,7 @@ func (u *_simpleMovingAverageAggregation) MovingAverageAggregationCaster() *type func (u *_movingAverageAggregation) EwmaMovingAverageAggregation(ewmamovingaverageaggregation types.EwmaMovingAverageAggregationVariant) *_movingAverageAggregation { - u.v = &ewmamovingaverageaggregation + u.v = ewmamovingaverageaggregation.EwmaMovingAverageAggregationCaster() return u } @@ -72,7 +72,7 @@ func (u *_ewmaMovingAverageAggregation) MovingAverageAggregationCaster() *types. func (u *_movingAverageAggregation) HoltMovingAverageAggregation(holtmovingaverageaggregation types.HoltMovingAverageAggregationVariant) *_movingAverageAggregation { - u.v = &holtmovingaverageaggregation + u.v = holtmovingaverageaggregation.HoltMovingAverageAggregationCaster() return u } @@ -85,7 +85,7 @@ func (u *_holtMovingAverageAggregation) MovingAverageAggregationCaster() *types. func (u *_movingAverageAggregation) HoltWintersMovingAverageAggregation(holtwintersmovingaverageaggregation types.HoltWintersMovingAverageAggregationVariant) *_movingAverageAggregation { - u.v = &holtwintersmovingaverageaggregation + u.v = holtwintersmovingaverageaggregation.HoltWintersMovingAverageAggregationCaster() return u } diff --git a/typedapi/esdsl/movingfunctionaggregation.go b/typedapi/esdsl/movingfunctionaggregation.go index d9e2cfdf24..bbbdef2b58 100644 --- a/typedapi/esdsl/movingfunctionaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/movingpercentilesaggregation.go b/typedapi/esdsl/movingpercentilesaggregation.go index 435261025f..ac66c56b35 100644 --- a/typedapi/esdsl/movingpercentilesaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/msearchrequestitem.go b/typedapi/esdsl/msearchrequestitem.go index 6ec1839d5b..5209fee037 100644 --- a/typedapi/esdsl/msearchrequestitem.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -33,7 +33,7 @@ func NewMsearchRequestItem() *_msearchRequestItem { func (u *_msearchRequestItem) MultisearchHeader(multisearchheader types.MultisearchHeaderVariant) *_msearchRequestItem { - u.v = &multisearchheader + u.v = multisearchheader.MultisearchHeaderCaster() return u } @@ -46,7 +46,7 @@ func (u *_multisearchHeader) MsearchRequestItemCaster() *types.MsearchRequestIte func (u *_msearchRequestItem) SearchRequestBody(searchrequestbody types.SearchRequestBodyVariant) *_msearchRequestItem { - u.v = &searchrequestbody + u.v = searchrequestbody.SearchRequestBodyCaster() return u } diff --git a/typedapi/esdsl/mtermvectorsoperation.go b/typedapi/esdsl/mtermvectorsoperation.go index 46adba00df..7893f746a2 100644 --- a/typedapi/esdsl/mtermvectorsoperation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/multimatchquery.go b/typedapi/esdsl/multimatchquery.go index d30a98692e..30f2fe0553 100644 --- a/typedapi/esdsl/multimatchquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/multiplexertokenfilter.go b/typedapi/esdsl/multiplexertokenfilter.go index 2a49a428b6..a562b3046f 100644 --- a/typedapi/esdsl/multiplexertokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/multisearchheader.go b/typedapi/esdsl/multisearchheader.go index af2d13ee40..7a6b196e32 100644 --- a/typedapi/esdsl/multisearchheader.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/multitermlookup.go b/typedapi/esdsl/multitermlookup.go index 63ddab8445..f7631fb29a 100644 --- a/typedapi/esdsl/multitermlookup.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/multitermsaggregation.go b/typedapi/esdsl/multitermsaggregation.go index 4817f1a3eb..425e543c9e 100644 --- a/typedapi/esdsl/multitermsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/murmur3hashproperty.go b/typedapi/esdsl/murmur3hashproperty.go index fde4df9b8d..a2f6e41862 100644 --- a/typedapi/esdsl/murmur3hashproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/mutualinformationheuristic.go b/typedapi/esdsl/mutualinformationheuristic.go index 687d4ec205..b38692992f 100644 --- a/typedapi/esdsl/mutualinformationheuristic.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/names.go b/typedapi/esdsl/names.go index 3ba2b63fe8..7a2586f69e 100644 --- a/typedapi/esdsl/names.go +++ b/typedapi/esdsl/names.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/nerinferenceoptions.go b/typedapi/esdsl/nerinferenceoptions.go index 895fe0cb1f..b2fc2cc11a 100644 --- a/typedapi/esdsl/nerinferenceoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/nerinferenceupdateoptions.go b/typedapi/esdsl/nerinferenceupdateoptions.go index 8d3f4a64cb..38d6b1e43b 100644 --- a/typedapi/esdsl/nerinferenceupdateoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/nestedaggregation.go b/typedapi/esdsl/nestedaggregation.go index 9bfef54de2..efe45d73f0 100644 --- a/typedapi/esdsl/nestedaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/nestedproperty.go b/typedapi/esdsl/nestedproperty.go index 2c338a1da1..ccdb492e02 100644 --- a/typedapi/esdsl/nestedproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/nestedquery.go b/typedapi/esdsl/nestedquery.go index 980587823f..18c2fb2267 100644 --- a/typedapi/esdsl/nestedquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/nestedsortvalue.go b/typedapi/esdsl/nestedsortvalue.go index b3a1aa0644..dee58bc98d 100644 --- a/typedapi/esdsl/nestedsortvalue.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/networkdirectionprocessor.go b/typedapi/esdsl/networkdirectionprocessor.go index ea8b88f7f8..bd1067f7b3 100644 --- a/typedapi/esdsl/networkdirectionprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/nevercondition.go b/typedapi/esdsl/nevercondition.go index 62f5d40fd5..5f162dfac3 100644 --- a/typedapi/esdsl/nevercondition.go +++ b/typedapi/esdsl/nevercondition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ngramtokenfilter.go b/typedapi/esdsl/ngramtokenfilter.go index 5bdcfc3e86..dedc513689 100644 --- a/typedapi/esdsl/ngramtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ngramtokenizer.go b/typedapi/esdsl/ngramtokenizer.go index 7bf015c654..eeadd2002f 100644 --- a/typedapi/esdsl/ngramtokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/nlpberttokenizationconfig.go b/typedapi/esdsl/nlpberttokenizationconfig.go index 0f2a265220..807e330d8c 100644 --- a/typedapi/esdsl/nlpberttokenizationconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/nlprobertatokenizationconfig.go b/typedapi/esdsl/nlprobertatokenizationconfig.go index ab0ed593e3..ebb3dfce5e 100644 --- a/typedapi/esdsl/nlprobertatokenizationconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/nlptokenizationupdateoptions.go b/typedapi/esdsl/nlptokenizationupdateoptions.go index ba07f8d7ee..f512baf148 100644 --- a/typedapi/esdsl/nlptokenizationupdateoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/norianalyzer.go b/typedapi/esdsl/norianalyzer.go index c838dcca63..f31a7ef7bc 100644 --- a/typedapi/esdsl/norianalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/noripartofspeechtokenfilter.go b/typedapi/esdsl/noripartofspeechtokenfilter.go index d20a010e94..0a65f2603a 100644 --- a/typedapi/esdsl/noripartofspeechtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/noritokenizer.go b/typedapi/esdsl/noritokenizer.go index 547e8be61d..75fd8d63d8 100644 --- a/typedapi/esdsl/noritokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/normalizeaggregation.go b/typedapi/esdsl/normalizeaggregation.go index b7c8fd4911..dd2678bf6f 100644 --- a/typedapi/esdsl/normalizeaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/normalizer.go b/typedapi/esdsl/normalizer.go index c7b0422163..24376ae2af 100644 --- a/typedapi/esdsl/normalizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -33,7 +33,7 @@ func NewNormalizer() *_normalizer { func (u *_normalizer) LowercaseNormalizer(lowercasenormalizer types.LowercaseNormalizerVariant) *_normalizer { - u.v = &lowercasenormalizer + u.v = lowercasenormalizer.LowercaseNormalizerCaster() return u } @@ -46,7 +46,7 @@ func (u *_lowercaseNormalizer) NormalizerCaster() *types.Normalizer { func (u *_normalizer) CustomNormalizer(customnormalizer types.CustomNormalizerVariant) *_normalizer { - u.v = &customnormalizer + u.v = customnormalizer.CustomNormalizerCaster() return u } diff --git a/typedapi/esdsl/norwegiananalyzer.go b/typedapi/esdsl/norwegiananalyzer.go index 46cee771a6..36d0912c9c 100644 --- a/typedapi/esdsl/norwegiananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_norwegianAnalyzer) StemExclusion(stemexclusions ...string) *_norwegian return s } -func (s *_norwegianAnalyzer) Stopwords(stopwords ...string) *_norwegianAnalyzer { +func (s *_norwegianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_norwegianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/numberrangequery.go b/typedapi/esdsl/numberrangequery.go index 1e888d4318..44e6299802 100644 --- a/typedapi/esdsl/numberrangequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -30,7 +30,7 @@ type _numberRangeQuery struct { v *types.NumberRangeQuery } -// Returns documents that contain terms within a provided range. +// Returns users that contain terms within a provided range. func NewNumberRangeQuery(key string) *_numberRangeQuery { return &_numberRangeQuery{ k: key, @@ -45,13 +45,6 @@ func (s *_numberRangeQuery) Boost(boost float32) *_numberRangeQuery { return s } -func (s *_numberRangeQuery) From(from types.Float64) *_numberRangeQuery { - - s.v.From = &from - - return s -} - func (s *_numberRangeQuery) Gt(gt types.Float64) *_numberRangeQuery { s.v.Gt = > @@ -93,13 +86,6 @@ func (s *_numberRangeQuery) Relation(relation rangerelation.RangeRelation) *_num return s } -func (s *_numberRangeQuery) To(to types.Float64) *_numberRangeQuery { - - s.v.To = &to - - return s -} - func (s *_numberRangeQuery) QueryCaster() *types.Query { container := types.NewQuery() container.Range = map[string]types.RangeQuery{ diff --git a/typedapi/esdsl/numericdecayfunction.go b/typedapi/esdsl/numericdecayfunction.go index a8986071ad..361484bb9a 100644 --- a/typedapi/esdsl/numericdecayfunction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/numericfielddata.go b/typedapi/esdsl/numericfielddata.go index a2f6346228..a8f024d162 100644 --- a/typedapi/esdsl/numericfielddata.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/objectproperty.go b/typedapi/esdsl/objectproperty.go index 8f2b73d747..12471a3e03 100644 --- a/typedapi/esdsl/objectproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/onehotencodingpreprocessor.go b/typedapi/esdsl/onehotencodingpreprocessor.go index a0a328a015..cd449510c0 100644 --- a/typedapi/esdsl/onehotencodingpreprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/openaiservicesettings.go b/typedapi/esdsl/openaiservicesettings.go index 595df57ef6..836f75f5ef 100644 --- a/typedapi/esdsl/openaiservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/openaitasksettings.go b/typedapi/esdsl/openaitasksettings.go index 3bbe5c6108..bd1f6d8cd3 100644 --- a/typedapi/esdsl/openaitasksettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/operationcontainer.go b/typedapi/esdsl/operationcontainer.go index 374f5b0220..ba2c5e91e3 100644 --- a/typedapi/esdsl/operationcontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/page.go b/typedapi/esdsl/page.go index bb99378eec..e19b60b7e3 100644 --- a/typedapi/esdsl/page.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pagerdutyaction.go b/typedapi/esdsl/pagerdutyaction.go index 6aa22079d8..cb3637f599 100644 --- a/typedapi/esdsl/pagerdutyaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pagerdutycontext.go b/typedapi/esdsl/pagerdutycontext.go index ff0830b03d..7a1c4c4fb3 100644 --- a/typedapi/esdsl/pagerdutycontext.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pagerdutyeventproxy.go b/typedapi/esdsl/pagerdutyeventproxy.go index 5e34c2249a..5701f791f2 100644 --- a/typedapi/esdsl/pagerdutyeventproxy.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/painlesscontextsetup.go b/typedapi/esdsl/painlesscontextsetup.go index b60b359936..7a234c1e12 100644 --- a/typedapi/esdsl/painlesscontextsetup.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/parentaggregation.go b/typedapi/esdsl/parentaggregation.go index df2bb04112..355305a645 100644 --- a/typedapi/esdsl/parentaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/parentidquery.go b/typedapi/esdsl/parentidquery.go index 257d129885..07e20556de 100644 --- a/typedapi/esdsl/parentidquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/passthroughinferenceoptions.go b/typedapi/esdsl/passthroughinferenceoptions.go index 0d57942420..27be8a1ca3 100644 --- a/typedapi/esdsl/passthroughinferenceoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/passthroughinferenceupdateoptions.go b/typedapi/esdsl/passthroughinferenceupdateoptions.go index c3cf98ee8c..317a3d1776 100644 --- a/typedapi/esdsl/passthroughinferenceupdateoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/passthroughobjectproperty.go b/typedapi/esdsl/passthroughobjectproperty.go index 22708d4116..562054ae1b 100644 --- a/typedapi/esdsl/passthroughobjectproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pathhierarchytokenizer.go b/typedapi/esdsl/pathhierarchytokenizer.go index 06eaa15f56..4998c9c64f 100644 --- a/typedapi/esdsl/pathhierarchytokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/patternanalyzer.go b/typedapi/esdsl/patternanalyzer.go index 65f186a51a..4c72d79e34 100644 --- a/typedapi/esdsl/patternanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -53,9 +53,9 @@ func (s *_patternAnalyzer) Pattern(pattern string) *_patternAnalyzer { return s } -func (s *_patternAnalyzer) Stopwords(stopwords ...string) *_patternAnalyzer { +func (s *_patternAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_patternAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/patterncapturetokenfilter.go b/typedapi/esdsl/patterncapturetokenfilter.go index 250fefdd6e..d46e03839f 100644 --- a/typedapi/esdsl/patterncapturetokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/patternreplacecharfilter.go b/typedapi/esdsl/patternreplacecharfilter.go index 7326b50c63..3c7ce8d46a 100644 --- a/typedapi/esdsl/patternreplacecharfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/patternreplacetokenfilter.go b/typedapi/esdsl/patternreplacetokenfilter.go index 46648745d5..7c9cd1fbd9 100644 --- a/typedapi/esdsl/patternreplacetokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/patterntokenizer.go b/typedapi/esdsl/patterntokenizer.go index d0731462a3..3f1c30a082 100644 --- a/typedapi/esdsl/patterntokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/percentage.go b/typedapi/esdsl/percentage.go index cb4fd96509..0f93a06ace 100644 --- a/typedapi/esdsl/percentage.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/percentagescoreheuristic.go b/typedapi/esdsl/percentagescoreheuristic.go index 325e69c685..431cf04453 100644 --- a/typedapi/esdsl/percentagescoreheuristic.go +++ b/typedapi/esdsl/percentagescoreheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/percentileranksaggregation.go b/typedapi/esdsl/percentileranksaggregation.go index 094b948a71..3339fb6bc8 100644 --- a/typedapi/esdsl/percentileranksaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/percentilesaggregation.go b/typedapi/esdsl/percentilesaggregation.go index ef61f7e3e5..c6a67b99aa 100644 --- a/typedapi/esdsl/percentilesaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/percentilesbucketaggregation.go b/typedapi/esdsl/percentilesbucketaggregation.go index e6f86b6d53..fc1c9f52d0 100644 --- a/typedapi/esdsl/percentilesbucketaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/percolatequery.go b/typedapi/esdsl/percolatequery.go index f3b162513b..58b7bc1241 100644 --- a/typedapi/esdsl/percolatequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/percolatorproperty.go b/typedapi/esdsl/percolatorproperty.go index a44f5bf877..75363c4eb1 100644 --- a/typedapi/esdsl/percolatorproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/perpartitioncategorization.go b/typedapi/esdsl/perpartitioncategorization.go index f8a3433ff3..2f3ac6a82e 100644 --- a/typedapi/esdsl/perpartitioncategorization.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/persiananalyzer.go b/typedapi/esdsl/persiananalyzer.go index 4b974a099f..02653b4415 100644 --- a/typedapi/esdsl/persiananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -32,9 +32,9 @@ func NewPersianAnalyzer() *_persianAnalyzer { } -func (s *_persianAnalyzer) Stopwords(stopwords ...string) *_persianAnalyzer { +func (s *_persianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_persianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/persiannormalizationtokenfilter.go b/typedapi/esdsl/persiannormalizationtokenfilter.go new file mode 100644 index 0000000000..e6a48c504e --- /dev/null +++ b/typedapi/esdsl/persiannormalizationtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _persianNormalizationTokenFilter struct { + v *types.PersianNormalizationTokenFilter +} + +func NewPersianNormalizationTokenFilter() *_persianNormalizationTokenFilter { + + return &_persianNormalizationTokenFilter{v: types.NewPersianNormalizationTokenFilter()} + +} + +func (s *_persianNormalizationTokenFilter) Version(versionstring string) *_persianNormalizationTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_persianNormalizationTokenFilter) PersianNormalizationTokenFilterCaster() *types.PersianNormalizationTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/persianstemtokenfilter.go b/typedapi/esdsl/persianstemtokenfilter.go new file mode 100644 index 0000000000..fc4db84d5f --- /dev/null +++ b/typedapi/esdsl/persianstemtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _persianStemTokenFilter struct { + v *types.PersianStemTokenFilter +} + +func NewPersianStemTokenFilter() *_persianStemTokenFilter { + + return &_persianStemTokenFilter{v: types.NewPersianStemTokenFilter()} + +} + +func (s *_persianStemTokenFilter) Version(versionstring string) *_persianStemTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_persianStemTokenFilter) PersianStemTokenFilterCaster() *types.PersianStemTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/phase.go b/typedapi/esdsl/phase.go index 08a12a4863..a3cacddccc 100644 --- a/typedapi/esdsl/phase.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/phases.go b/typedapi/esdsl/phases.go index 4b312cb6cb..807262cbf1 100644 --- a/typedapi/esdsl/phases.go +++ b/typedapi/esdsl/phases.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/phonetictokenfilter.go b/typedapi/esdsl/phonetictokenfilter.go index 9b27c4a583..bb797d92e9 100644 --- a/typedapi/esdsl/phonetictokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/phrasesuggestcollate.go b/typedapi/esdsl/phrasesuggestcollate.go index a1556e2516..7e42f58f95 100644 --- a/typedapi/esdsl/phrasesuggestcollate.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/phrasesuggestcollatequery.go b/typedapi/esdsl/phrasesuggestcollatequery.go index e3984f7dd2..b2e6f3bd0a 100644 --- a/typedapi/esdsl/phrasesuggestcollatequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/phrasesuggester.go b/typedapi/esdsl/phrasesuggester.go index 44e0cccd01..d135cf4b3d 100644 --- a/typedapi/esdsl/phrasesuggester.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/phrasesuggesthighlight.go b/typedapi/esdsl/phrasesuggesthighlight.go index 97341a2f77..1474002c53 100644 --- a/typedapi/esdsl/phrasesuggesthighlight.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pinneddoc.go b/typedapi/esdsl/pinneddoc.go index ecb8469721..1ae6fd1cd9 100644 --- a/typedapi/esdsl/pinneddoc.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pinnedquery.go b/typedapi/esdsl/pinnedquery.go index 9947fe7aa5..b64bdf9211 100644 --- a/typedapi/esdsl/pinnedquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pinnedretriever.go b/typedapi/esdsl/pinnedretriever.go new file mode 100644 index 0000000000..91451df6ea --- /dev/null +++ b/typedapi/esdsl/pinnedretriever.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _pinnedRetriever struct { + v *types.PinnedRetriever +} + +// A pinned retriever applies pinned documents to the underlying retriever. +// This retriever will rewrite to a PinnedQueryBuilder. +func NewPinnedRetriever(retriever types.RetrieverContainerVariant) *_pinnedRetriever { + + tmp := &_pinnedRetriever{v: types.NewPinnedRetriever()} + + tmp.Retriever(retriever) + + return tmp + +} + +func (s *_pinnedRetriever) Docs(docs ...types.SpecifiedDocumentVariant) *_pinnedRetriever { + + for _, v := range docs { + + s.v.Docs = append(s.v.Docs, *v.SpecifiedDocumentCaster()) + + } + return s +} + +func (s *_pinnedRetriever) Filter(filters ...types.QueryVariant) *_pinnedRetriever { + + s.v.Filter = make([]types.Query, len(filters)) + for i, v := range filters { + s.v.Filter[i] = *v.QueryCaster() + } + + return s +} + +func (s *_pinnedRetriever) Ids(ids ...string) *_pinnedRetriever { + + for _, v := range ids { + + s.v.Ids = append(s.v.Ids, v) + + } + return s +} + +func (s *_pinnedRetriever) MinScore(minscore float32) *_pinnedRetriever { + + s.v.MinScore = &minscore + + return s +} + +func (s *_pinnedRetriever) Name_(name_ string) *_pinnedRetriever { + + s.v.Name_ = &name_ + + return s +} + +func (s *_pinnedRetriever) RankWindowSize(rankwindowsize int) *_pinnedRetriever { + + s.v.RankWindowSize = &rankwindowsize + + return s +} + +func (s *_pinnedRetriever) Retriever(retriever types.RetrieverContainerVariant) *_pinnedRetriever { + + s.v.Retriever = *retriever.RetrieverContainerCaster() + + return s +} + +func (s *_pinnedRetriever) RetrieverContainerCaster() *types.RetrieverContainer { + container := types.NewRetrieverContainer() + + container.Pinned = s.v + + return container +} + +func (s *_pinnedRetriever) PinnedRetrieverCaster() *types.PinnedRetriever { + return s.v +} diff --git a/typedapi/esdsl/pipelinemetadata.go b/typedapi/esdsl/pipelinemetadata.go index 188e8994b7..feab5d2dfa 100644 --- a/typedapi/esdsl/pipelinemetadata.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pipelineprocessor.go b/typedapi/esdsl/pipelineprocessor.go index 2457b0690e..d7367fa0a6 100644 --- a/typedapi/esdsl/pipelineprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pipelinesettings.go b/typedapi/esdsl/pipelinesettings.go index 827526cb83..334417840e 100644 --- a/typedapi/esdsl/pipelinesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pipeseparatedflagssimplequerystringflag.go b/typedapi/esdsl/pipeseparatedflagssimplequerystringflag.go index c706959f84..c91f273d92 100644 --- a/typedapi/esdsl/pipeseparatedflagssimplequerystringflag.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pivot.go b/typedapi/esdsl/pivot.go index 010e68ab24..50a2b49bea 100644 --- a/typedapi/esdsl/pivot.go +++ b/typedapi/esdsl/pivot.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pivotgroupbycontainer.go b/typedapi/esdsl/pivotgroupbycontainer.go index 25bf57b7ef..a3781b64db 100644 --- a/typedapi/esdsl/pivotgroupbycontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pointintimereference.go b/typedapi/esdsl/pointintimereference.go index a1da1523f5..779426f404 100644 --- a/typedapi/esdsl/pointintimereference.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/pointproperty.go b/typedapi/esdsl/pointproperty.go index 928d732247..6309c22763 100644 --- a/typedapi/esdsl/pointproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/porterstemtokenfilter.go b/typedapi/esdsl/porterstemtokenfilter.go index 91f0a20290..c02554383d 100644 --- a/typedapi/esdsl/porterstemtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/portugueseanalyzer.go b/typedapi/esdsl/portugueseanalyzer.go index 1179a4ee01..d99775c97a 100644 --- a/typedapi/esdsl/portugueseanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_portugueseAnalyzer) StemExclusion(stemexclusions ...string) *_portugue return s } -func (s *_portugueseAnalyzer) Stopwords(stopwords ...string) *_portugueseAnalyzer { +func (s *_portugueseAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_portugueseAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/predicatetokenfilter.go b/typedapi/esdsl/predicatetokenfilter.go index 405f5fdb24..fb4062d2f8 100644 --- a/typedapi/esdsl/predicatetokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/prefixquery.go b/typedapi/esdsl/prefixquery.go index 3916a98f8f..176d99b150 100644 --- a/typedapi/esdsl/prefixquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -27,7 +27,7 @@ type _prefixQuery struct { v *types.PrefixQuery } -// Returns roles that contain a specific prefix in a provided field. +// Returns documents that contain a specific prefix in a provided field. func NewPrefixQuery(field string, value string) *_prefixQuery { tmp := &_prefixQuery{ k: field, diff --git a/typedapi/esdsl/preprocessor.go b/typedapi/esdsl/preprocessor.go index 46653ea9fc..f1c8131535 100644 --- a/typedapi/esdsl/preprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/privilegesactions.go b/typedapi/esdsl/privilegesactions.go index b3eb2996a3..264846374a 100644 --- a/typedapi/esdsl/privilegesactions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/privilegescheck.go b/typedapi/esdsl/privilegescheck.go index 7ef21d84c2..40aa480c35 100644 --- a/typedapi/esdsl/privilegescheck.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/processorcontainer.go b/typedapi/esdsl/processorcontainer.go index 39d8221365..09b8b26d2f 100644 --- a/typedapi/esdsl/processorcontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/property.go b/typedapi/esdsl/property.go index 61a030ef3d..e1788a6c27 100644 --- a/typedapi/esdsl/property.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -44,7 +44,7 @@ func (u *_property) UnknownProperty(unknown json.RawMessage) *_property { func (u *_property) BinaryProperty(binaryproperty types.BinaryPropertyVariant) *_property { - u.v = &binaryproperty + u.v = binaryproperty.BinaryPropertyCaster() return u } @@ -57,7 +57,7 @@ func (u *_binaryProperty) PropertyCaster() *types.Property { func (u *_property) BooleanProperty(booleanproperty types.BooleanPropertyVariant) *_property { - u.v = &booleanproperty + u.v = booleanproperty.BooleanPropertyCaster() return u } @@ -70,7 +70,7 @@ func (u *_booleanProperty) PropertyCaster() *types.Property { func (u *_property) DynamicProperty(dynamicproperty types.DynamicPropertyVariant) *_property { - u.v = &dynamicproperty + u.v = dynamicproperty.DynamicPropertyCaster() return u } @@ -83,7 +83,7 @@ func (u *_dynamicProperty) PropertyCaster() *types.Property { func (u *_property) JoinProperty(joinproperty types.JoinPropertyVariant) *_property { - u.v = &joinproperty + u.v = joinproperty.JoinPropertyCaster() return u } @@ -96,7 +96,7 @@ func (u *_joinProperty) PropertyCaster() *types.Property { func (u *_property) KeywordProperty(keywordproperty types.KeywordPropertyVariant) *_property { - u.v = &keywordproperty + u.v = keywordproperty.KeywordPropertyCaster() return u } @@ -109,7 +109,7 @@ func (u *_keywordProperty) PropertyCaster() *types.Property { func (u *_property) MatchOnlyTextProperty(matchonlytextproperty types.MatchOnlyTextPropertyVariant) *_property { - u.v = &matchonlytextproperty + u.v = matchonlytextproperty.MatchOnlyTextPropertyCaster() return u } @@ -122,7 +122,7 @@ func (u *_matchOnlyTextProperty) PropertyCaster() *types.Property { func (u *_property) PercolatorProperty(percolatorproperty types.PercolatorPropertyVariant) *_property { - u.v = &percolatorproperty + u.v = percolatorproperty.PercolatorPropertyCaster() return u } @@ -135,7 +135,7 @@ func (u *_percolatorProperty) PropertyCaster() *types.Property { func (u *_property) RankFeatureProperty(rankfeatureproperty types.RankFeaturePropertyVariant) *_property { - u.v = &rankfeatureproperty + u.v = rankfeatureproperty.RankFeaturePropertyCaster() return u } @@ -148,7 +148,7 @@ func (u *_rankFeatureProperty) PropertyCaster() *types.Property { func (u *_property) RankFeaturesProperty(rankfeaturesproperty types.RankFeaturesPropertyVariant) *_property { - u.v = &rankfeaturesproperty + u.v = rankfeaturesproperty.RankFeaturesPropertyCaster() return u } @@ -161,7 +161,7 @@ func (u *_rankFeaturesProperty) PropertyCaster() *types.Property { func (u *_property) SearchAsYouTypeProperty(searchasyoutypeproperty types.SearchAsYouTypePropertyVariant) *_property { - u.v = &searchasyoutypeproperty + u.v = searchasyoutypeproperty.SearchAsYouTypePropertyCaster() return u } @@ -174,7 +174,7 @@ func (u *_searchAsYouTypeProperty) PropertyCaster() *types.Property { func (u *_property) TextProperty(textproperty types.TextPropertyVariant) *_property { - u.v = &textproperty + u.v = textproperty.TextPropertyCaster() return u } @@ -187,7 +187,7 @@ func (u *_textProperty) PropertyCaster() *types.Property { func (u *_property) VersionProperty(versionproperty types.VersionPropertyVariant) *_property { - u.v = &versionproperty + u.v = versionproperty.VersionPropertyCaster() return u } @@ -200,7 +200,7 @@ func (u *_versionProperty) PropertyCaster() *types.Property { func (u *_property) WildcardProperty(wildcardproperty types.WildcardPropertyVariant) *_property { - u.v = &wildcardproperty + u.v = wildcardproperty.WildcardPropertyCaster() return u } @@ -213,7 +213,7 @@ func (u *_wildcardProperty) PropertyCaster() *types.Property { func (u *_property) DateNanosProperty(datenanosproperty types.DateNanosPropertyVariant) *_property { - u.v = &datenanosproperty + u.v = datenanosproperty.DateNanosPropertyCaster() return u } @@ -226,7 +226,7 @@ func (u *_dateNanosProperty) PropertyCaster() *types.Property { func (u *_property) DateProperty(dateproperty types.DatePropertyVariant) *_property { - u.v = &dateproperty + u.v = dateproperty.DatePropertyCaster() return u } @@ -239,7 +239,7 @@ func (u *_dateProperty) PropertyCaster() *types.Property { func (u *_property) AggregateMetricDoubleProperty(aggregatemetricdoubleproperty types.AggregateMetricDoublePropertyVariant) *_property { - u.v = &aggregatemetricdoubleproperty + u.v = aggregatemetricdoubleproperty.AggregateMetricDoublePropertyCaster() return u } @@ -252,7 +252,7 @@ func (u *_aggregateMetricDoubleProperty) PropertyCaster() *types.Property { func (u *_property) DenseVectorProperty(densevectorproperty types.DenseVectorPropertyVariant) *_property { - u.v = &densevectorproperty + u.v = densevectorproperty.DenseVectorPropertyCaster() return u } @@ -265,7 +265,7 @@ func (u *_denseVectorProperty) PropertyCaster() *types.Property { func (u *_property) FlattenedProperty(flattenedproperty types.FlattenedPropertyVariant) *_property { - u.v = &flattenedproperty + u.v = flattenedproperty.FlattenedPropertyCaster() return u } @@ -278,7 +278,7 @@ func (u *_flattenedProperty) PropertyCaster() *types.Property { func (u *_property) NestedProperty(nestedproperty types.NestedPropertyVariant) *_property { - u.v = &nestedproperty + u.v = nestedproperty.NestedPropertyCaster() return u } @@ -291,7 +291,7 @@ func (u *_nestedProperty) PropertyCaster() *types.Property { func (u *_property) ObjectProperty(objectproperty types.ObjectPropertyVariant) *_property { - u.v = &objectproperty + u.v = objectproperty.ObjectPropertyCaster() return u } @@ -304,7 +304,7 @@ func (u *_objectProperty) PropertyCaster() *types.Property { func (u *_property) PassthroughObjectProperty(passthroughobjectproperty types.PassthroughObjectPropertyVariant) *_property { - u.v = &passthroughobjectproperty + u.v = passthroughobjectproperty.PassthroughObjectPropertyCaster() return u } @@ -315,9 +315,22 @@ func (u *_passthroughObjectProperty) PropertyCaster() *types.Property { return &t } +func (u *_property) RankVectorProperty(rankvectorproperty types.RankVectorPropertyVariant) *_property { + + u.v = rankvectorproperty.RankVectorPropertyCaster() + + return u +} + +// Interface implementation for RankVectorProperty in Property union +func (u *_rankVectorProperty) PropertyCaster() *types.Property { + t := types.Property(u.v) + return &t +} + func (u *_property) SemanticTextProperty(semantictextproperty types.SemanticTextPropertyVariant) *_property { - u.v = &semantictextproperty + u.v = semantictextproperty.SemanticTextPropertyCaster() return u } @@ -330,7 +343,7 @@ func (u *_semanticTextProperty) PropertyCaster() *types.Property { func (u *_property) SparseVectorProperty(sparsevectorproperty types.SparseVectorPropertyVariant) *_property { - u.v = &sparsevectorproperty + u.v = sparsevectorproperty.SparseVectorPropertyCaster() return u } @@ -343,7 +356,7 @@ func (u *_sparseVectorProperty) PropertyCaster() *types.Property { func (u *_property) CompletionProperty(completionproperty types.CompletionPropertyVariant) *_property { - u.v = &completionproperty + u.v = completionproperty.CompletionPropertyCaster() return u } @@ -356,7 +369,7 @@ func (u *_completionProperty) PropertyCaster() *types.Property { func (u *_property) ConstantKeywordProperty(constantkeywordproperty types.ConstantKeywordPropertyVariant) *_property { - u.v = &constantkeywordproperty + u.v = constantkeywordproperty.ConstantKeywordPropertyCaster() return u } @@ -369,7 +382,7 @@ func (u *_constantKeywordProperty) PropertyCaster() *types.Property { func (u *_property) CountedKeywordProperty(countedkeywordproperty types.CountedKeywordPropertyVariant) *_property { - u.v = &countedkeywordproperty + u.v = countedkeywordproperty.CountedKeywordPropertyCaster() return u } @@ -382,7 +395,7 @@ func (u *_countedKeywordProperty) PropertyCaster() *types.Property { func (u *_property) FieldAliasProperty(fieldaliasproperty types.FieldAliasPropertyVariant) *_property { - u.v = &fieldaliasproperty + u.v = fieldaliasproperty.FieldAliasPropertyCaster() return u } @@ -395,7 +408,7 @@ func (u *_fieldAliasProperty) PropertyCaster() *types.Property { func (u *_property) HistogramProperty(histogramproperty types.HistogramPropertyVariant) *_property { - u.v = &histogramproperty + u.v = histogramproperty.HistogramPropertyCaster() return u } @@ -408,7 +421,7 @@ func (u *_histogramProperty) PropertyCaster() *types.Property { func (u *_property) IpProperty(ipproperty types.IpPropertyVariant) *_property { - u.v = &ipproperty + u.v = ipproperty.IpPropertyCaster() return u } @@ -421,7 +434,7 @@ func (u *_ipProperty) PropertyCaster() *types.Property { func (u *_property) Murmur3HashProperty(murmur3hashproperty types.Murmur3HashPropertyVariant) *_property { - u.v = &murmur3hashproperty + u.v = murmur3hashproperty.Murmur3HashPropertyCaster() return u } @@ -434,7 +447,7 @@ func (u *_murmur3HashProperty) PropertyCaster() *types.Property { func (u *_property) TokenCountProperty(tokencountproperty types.TokenCountPropertyVariant) *_property { - u.v = &tokencountproperty + u.v = tokencountproperty.TokenCountPropertyCaster() return u } @@ -447,7 +460,7 @@ func (u *_tokenCountProperty) PropertyCaster() *types.Property { func (u *_property) GeoPointProperty(geopointproperty types.GeoPointPropertyVariant) *_property { - u.v = &geopointproperty + u.v = geopointproperty.GeoPointPropertyCaster() return u } @@ -460,7 +473,7 @@ func (u *_geoPointProperty) PropertyCaster() *types.Property { func (u *_property) GeoShapeProperty(geoshapeproperty types.GeoShapePropertyVariant) *_property { - u.v = &geoshapeproperty + u.v = geoshapeproperty.GeoShapePropertyCaster() return u } @@ -473,7 +486,7 @@ func (u *_geoShapeProperty) PropertyCaster() *types.Property { func (u *_property) PointProperty(pointproperty types.PointPropertyVariant) *_property { - u.v = &pointproperty + u.v = pointproperty.PointPropertyCaster() return u } @@ -486,7 +499,7 @@ func (u *_pointProperty) PropertyCaster() *types.Property { func (u *_property) ShapeProperty(shapeproperty types.ShapePropertyVariant) *_property { - u.v = &shapeproperty + u.v = shapeproperty.ShapePropertyCaster() return u } @@ -499,7 +512,7 @@ func (u *_shapeProperty) PropertyCaster() *types.Property { func (u *_property) ByteNumberProperty(bytenumberproperty types.ByteNumberPropertyVariant) *_property { - u.v = &bytenumberproperty + u.v = bytenumberproperty.ByteNumberPropertyCaster() return u } @@ -512,7 +525,7 @@ func (u *_byteNumberProperty) PropertyCaster() *types.Property { func (u *_property) DoubleNumberProperty(doublenumberproperty types.DoubleNumberPropertyVariant) *_property { - u.v = &doublenumberproperty + u.v = doublenumberproperty.DoubleNumberPropertyCaster() return u } @@ -525,7 +538,7 @@ func (u *_doubleNumberProperty) PropertyCaster() *types.Property { func (u *_property) FloatNumberProperty(floatnumberproperty types.FloatNumberPropertyVariant) *_property { - u.v = &floatnumberproperty + u.v = floatnumberproperty.FloatNumberPropertyCaster() return u } @@ -538,7 +551,7 @@ func (u *_floatNumberProperty) PropertyCaster() *types.Property { func (u *_property) HalfFloatNumberProperty(halffloatnumberproperty types.HalfFloatNumberPropertyVariant) *_property { - u.v = &halffloatnumberproperty + u.v = halffloatnumberproperty.HalfFloatNumberPropertyCaster() return u } @@ -551,7 +564,7 @@ func (u *_halfFloatNumberProperty) PropertyCaster() *types.Property { func (u *_property) IntegerNumberProperty(integernumberproperty types.IntegerNumberPropertyVariant) *_property { - u.v = &integernumberproperty + u.v = integernumberproperty.IntegerNumberPropertyCaster() return u } @@ -564,7 +577,7 @@ func (u *_integerNumberProperty) PropertyCaster() *types.Property { func (u *_property) LongNumberProperty(longnumberproperty types.LongNumberPropertyVariant) *_property { - u.v = &longnumberproperty + u.v = longnumberproperty.LongNumberPropertyCaster() return u } @@ -577,7 +590,7 @@ func (u *_longNumberProperty) PropertyCaster() *types.Property { func (u *_property) ScaledFloatNumberProperty(scaledfloatnumberproperty types.ScaledFloatNumberPropertyVariant) *_property { - u.v = &scaledfloatnumberproperty + u.v = scaledfloatnumberproperty.ScaledFloatNumberPropertyCaster() return u } @@ -590,7 +603,7 @@ func (u *_scaledFloatNumberProperty) PropertyCaster() *types.Property { func (u *_property) ShortNumberProperty(shortnumberproperty types.ShortNumberPropertyVariant) *_property { - u.v = &shortnumberproperty + u.v = shortnumberproperty.ShortNumberPropertyCaster() return u } @@ -603,7 +616,7 @@ func (u *_shortNumberProperty) PropertyCaster() *types.Property { func (u *_property) UnsignedLongNumberProperty(unsignedlongnumberproperty types.UnsignedLongNumberPropertyVariant) *_property { - u.v = &unsignedlongnumberproperty + u.v = unsignedlongnumberproperty.UnsignedLongNumberPropertyCaster() return u } @@ -616,7 +629,7 @@ func (u *_unsignedLongNumberProperty) PropertyCaster() *types.Property { func (u *_property) DateRangeProperty(daterangeproperty types.DateRangePropertyVariant) *_property { - u.v = &daterangeproperty + u.v = daterangeproperty.DateRangePropertyCaster() return u } @@ -629,7 +642,7 @@ func (u *_dateRangeProperty) PropertyCaster() *types.Property { func (u *_property) DoubleRangeProperty(doublerangeproperty types.DoubleRangePropertyVariant) *_property { - u.v = &doublerangeproperty + u.v = doublerangeproperty.DoubleRangePropertyCaster() return u } @@ -642,7 +655,7 @@ func (u *_doubleRangeProperty) PropertyCaster() *types.Property { func (u *_property) FloatRangeProperty(floatrangeproperty types.FloatRangePropertyVariant) *_property { - u.v = &floatrangeproperty + u.v = floatrangeproperty.FloatRangePropertyCaster() return u } @@ -655,7 +668,7 @@ func (u *_floatRangeProperty) PropertyCaster() *types.Property { func (u *_property) IntegerRangeProperty(integerrangeproperty types.IntegerRangePropertyVariant) *_property { - u.v = &integerrangeproperty + u.v = integerrangeproperty.IntegerRangePropertyCaster() return u } @@ -668,7 +681,7 @@ func (u *_integerRangeProperty) PropertyCaster() *types.Property { func (u *_property) IpRangeProperty(iprangeproperty types.IpRangePropertyVariant) *_property { - u.v = &iprangeproperty + u.v = iprangeproperty.IpRangePropertyCaster() return u } @@ -681,7 +694,7 @@ func (u *_ipRangeProperty) PropertyCaster() *types.Property { func (u *_property) LongRangeProperty(longrangeproperty types.LongRangePropertyVariant) *_property { - u.v = &longrangeproperty + u.v = longrangeproperty.LongRangePropertyCaster() return u } @@ -694,7 +707,7 @@ func (u *_longRangeProperty) PropertyCaster() *types.Property { func (u *_property) IcuCollationProperty(icucollationproperty types.IcuCollationPropertyVariant) *_property { - u.v = &icucollationproperty + u.v = icucollationproperty.IcuCollationPropertyCaster() return u } diff --git a/typedapi/esdsl/queries.go b/typedapi/esdsl/queries.go index 41dff46f9d..3c6b3deead 100644 --- a/typedapi/esdsl/queries.go +++ b/typedapi/esdsl/queries.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/query.go b/typedapi/esdsl/query.go index caeaaa8e0b..a2e042dc0d 100644 --- a/typedapi/esdsl/query.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/queryfeatureextractor.go b/typedapi/esdsl/queryfeatureextractor.go index 21bd3b117c..0a7c8d9dbd 100644 --- a/typedapi/esdsl/queryfeatureextractor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/queryrule.go b/typedapi/esdsl/queryrule.go index 061598302a..a4a94a38ca 100644 --- a/typedapi/esdsl/queryrule.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/queryruleactions.go b/typedapi/esdsl/queryruleactions.go index a174223620..fd5326851d 100644 --- a/typedapi/esdsl/queryruleactions.go +++ b/typedapi/esdsl/queryruleactions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/queryrulecriteria.go b/typedapi/esdsl/queryrulecriteria.go index 947717b026..64a9a8277f 100644 --- a/typedapi/esdsl/queryrulecriteria.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/querystringquery.go b/typedapi/esdsl/querystringquery.go index 15504dabf2..cdca2f06c5 100644 --- a/typedapi/esdsl/querystringquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/queryvectorbuilder.go b/typedapi/esdsl/queryvectorbuilder.go index 1f70d39ddc..e785b30174 100644 --- a/typedapi/esdsl/queryvectorbuilder.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/questionansweringinferenceoptions.go b/typedapi/esdsl/questionansweringinferenceoptions.go index 76b1669802..fd751bdaaa 100644 --- a/typedapi/esdsl/questionansweringinferenceoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/questionansweringinferenceupdateoptions.go b/typedapi/esdsl/questionansweringinferenceupdateoptions.go index ffacf21e94..2dee3fe4a3 100644 --- a/typedapi/esdsl/questionansweringinferenceupdateoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/randomsampleraggregation.go b/typedapi/esdsl/randomsampleraggregation.go index 72ce08e589..8ffe5af40c 100644 --- a/typedapi/esdsl/randomsampleraggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/randomscorefunction.go b/typedapi/esdsl/randomscorefunction.go index 430328ae6d..72e92ed754 100644 --- a/typedapi/esdsl/randomscorefunction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -45,7 +45,7 @@ func (s *_randomScoreFunction) Field(field string) *_randomScoreFunction { func (s *_randomScoreFunction) Seed(seed string) *_randomScoreFunction { - s.v.Seed = seed + s.v.Seed = &seed return s } diff --git a/typedapi/esdsl/rangeaggregation.go b/typedapi/esdsl/rangeaggregation.go index 575a1964d4..eceb703bb0 100644 --- a/typedapi/esdsl/rangeaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rangequery.go b/typedapi/esdsl/rangequery.go index dd67dceaee..ecec3165ea 100644 --- a/typedapi/esdsl/rangequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -33,7 +33,7 @@ func NewRangeQuery() *_rangeQuery { func (u *_rangeQuery) UntypedRangeQuery(untypedrangequery types.UntypedRangeQueryVariant) *_rangeQuery { - u.v = &untypedrangequery + u.v = untypedrangequery.UntypedRangeQueryCaster() return u } @@ -46,7 +46,7 @@ func (u *_untypedRangeQuery) RangeQueryCaster() *types.RangeQuery { func (u *_rangeQuery) DateRangeQuery(daterangequery types.DateRangeQueryVariant) *_rangeQuery { - u.v = &daterangequery + u.v = daterangequery.DateRangeQueryCaster() return u } @@ -59,7 +59,7 @@ func (u *_dateRangeQuery) RangeQueryCaster() *types.RangeQuery { func (u *_rangeQuery) NumberRangeQuery(numberrangequery types.NumberRangeQueryVariant) *_rangeQuery { - u.v = &numberrangequery + u.v = numberrangequery.NumberRangeQueryCaster() return u } @@ -72,7 +72,7 @@ func (u *_numberRangeQuery) RangeQueryCaster() *types.RangeQuery { func (u *_rangeQuery) TermRangeQuery(termrangequery types.TermRangeQueryVariant) *_rangeQuery { - u.v = &termrangequery + u.v = termrangequery.TermRangeQueryCaster() return u } diff --git a/typedapi/esdsl/rankcontainer.go b/typedapi/esdsl/rankcontainer.go index d49eb3562a..4b873270dc 100644 --- a/typedapi/esdsl/rankcontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankevalmetric.go b/typedapi/esdsl/rankevalmetric.go index 68ea91ef4a..ebbb238fa4 100644 --- a/typedapi/esdsl/rankevalmetric.go +++ b/typedapi/esdsl/rankevalmetric.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankevalmetricdiscountedcumulativegain.go b/typedapi/esdsl/rankevalmetricdiscountedcumulativegain.go index 016c57b687..b40a1c4c71 100644 --- a/typedapi/esdsl/rankevalmetricdiscountedcumulativegain.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankevalmetricexpectedreciprocalrank.go b/typedapi/esdsl/rankevalmetricexpectedreciprocalrank.go index 5fa81ec791..0931e21f14 100644 --- a/typedapi/esdsl/rankevalmetricexpectedreciprocalrank.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankevalmetricmeanreciprocalrank.go b/typedapi/esdsl/rankevalmetricmeanreciprocalrank.go index a0d6bb8e8b..67bd8399a9 100644 --- a/typedapi/esdsl/rankevalmetricmeanreciprocalrank.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankevalmetricprecision.go b/typedapi/esdsl/rankevalmetricprecision.go index 8e54b5624e..a76d0b1816 100644 --- a/typedapi/esdsl/rankevalmetricprecision.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankevalmetricrecall.go b/typedapi/esdsl/rankevalmetricrecall.go index b02022f2d6..ed9847110f 100644 --- a/typedapi/esdsl/rankevalmetricrecall.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankevalquery.go b/typedapi/esdsl/rankevalquery.go index 6caffb38a0..c7572b57a0 100644 --- a/typedapi/esdsl/rankevalquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankevalrequestitem.go b/typedapi/esdsl/rankevalrequestitem.go index fc003dae3d..443da64d57 100644 --- a/typedapi/esdsl/rankevalrequestitem.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankfeaturefunctionlinear.go b/typedapi/esdsl/rankfeaturefunctionlinear.go index eafe5e2ec2..70fdcfe2c1 100644 --- a/typedapi/esdsl/rankfeaturefunctionlinear.go +++ b/typedapi/esdsl/rankfeaturefunctionlinear.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankfeaturefunctionlogarithm.go b/typedapi/esdsl/rankfeaturefunctionlogarithm.go index 1bae610fe2..773225cc82 100644 --- a/typedapi/esdsl/rankfeaturefunctionlogarithm.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankfeaturefunctionsaturation.go b/typedapi/esdsl/rankfeaturefunctionsaturation.go index 3222f0be2f..b0131a46f0 100644 --- a/typedapi/esdsl/rankfeaturefunctionsaturation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankfeaturefunctionsigmoid.go b/typedapi/esdsl/rankfeaturefunctionsigmoid.go index eb10c3821a..fb852155a4 100644 --- a/typedapi/esdsl/rankfeaturefunctionsigmoid.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankfeatureproperty.go b/typedapi/esdsl/rankfeatureproperty.go index 9bfca70c20..eb61376fa2 100644 --- a/typedapi/esdsl/rankfeatureproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankfeaturequery.go b/typedapi/esdsl/rankfeaturequery.go index e9d3b5c5c8..2f13f2449b 100644 --- a/typedapi/esdsl/rankfeaturequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankfeaturesproperty.go b/typedapi/esdsl/rankfeaturesproperty.go index 80c0ff4f75..396bb21927 100644 --- a/typedapi/esdsl/rankfeaturesproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rankvectorproperty.go b/typedapi/esdsl/rankvectorproperty.go new file mode 100644 index 0000000000..1f4fb81424 --- /dev/null +++ b/typedapi/esdsl/rankvectorproperty.go @@ -0,0 +1,145 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/dynamicmapping" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/rankvectorelementtype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/syntheticsourcekeepenum" +) + +type _rankVectorProperty struct { + v *types.RankVectorProperty +} + +func NewRankVectorProperty() *_rankVectorProperty { + + return &_rankVectorProperty{v: types.NewRankVectorProperty()} + +} + +func (s *_rankVectorProperty) Dims(dims int) *_rankVectorProperty { + + s.v.Dims = &dims + + return s +} + +func (s *_rankVectorProperty) Dynamic(dynamic dynamicmapping.DynamicMapping) *_rankVectorProperty { + + s.v.Dynamic = &dynamic + return s +} + +func (s *_rankVectorProperty) ElementType(elementtype rankvectorelementtype.RankVectorElementType) *_rankVectorProperty { + + s.v.ElementType = &elementtype + return s +} + +func (s *_rankVectorProperty) Fields(fields map[string]types.Property) *_rankVectorProperty { + + s.v.Fields = fields + return s +} + +func (s *_rankVectorProperty) AddField(key string, value types.PropertyVariant) *_rankVectorProperty { + + var tmp map[string]types.Property + if s.v.Fields == nil { + s.v.Fields = make(map[string]types.Property) + } else { + tmp = s.v.Fields + } + + tmp[key] = *value.PropertyCaster() + + s.v.Fields = tmp + return s +} + +func (s *_rankVectorProperty) IgnoreAbove(ignoreabove int) *_rankVectorProperty { + + s.v.IgnoreAbove = &ignoreabove + + return s +} + +func (s *_rankVectorProperty) Meta(meta map[string]string) *_rankVectorProperty { + + s.v.Meta = meta + return s +} + +func (s *_rankVectorProperty) AddMeta(key string, value string) *_rankVectorProperty { + + var tmp map[string]string + if s.v.Meta == nil { + s.v.Meta = make(map[string]string) + } else { + tmp = s.v.Meta + } + + tmp[key] = value + + s.v.Meta = tmp + return s +} + +func (s *_rankVectorProperty) Properties(properties map[string]types.Property) *_rankVectorProperty { + + s.v.Properties = properties + return s +} + +func (s *_rankVectorProperty) AddProperty(key string, value types.PropertyVariant) *_rankVectorProperty { + + var tmp map[string]types.Property + if s.v.Properties == nil { + s.v.Properties = make(map[string]types.Property) + } else { + tmp = s.v.Properties + } + + tmp[key] = *value.PropertyCaster() + + s.v.Properties = tmp + return s +} + +func (s *_rankVectorProperty) SyntheticSourceKeep(syntheticsourcekeep syntheticsourcekeepenum.SyntheticSourceKeepEnum) *_rankVectorProperty { + + s.v.SyntheticSourceKeep = &syntheticsourcekeep + return s +} + +func (s *_rankVectorProperty) DynamicTemplateCaster() *types.DynamicTemplate { + container := types.NewDynamicTemplate() + + container.Mapping = s.v + + return container +} + +func (s *_rankVectorProperty) RankVectorPropertyCaster() *types.RankVectorProperty { + return s.v +} diff --git a/typedapi/esdsl/raretermsaggregation.go b/typedapi/esdsl/raretermsaggregation.go index a3325a9693..d5963bc48d 100644 --- a/typedapi/esdsl/raretermsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rateaggregation.go b/typedapi/esdsl/rateaggregation.go index cd00e2a806..e4f21258f3 100644 --- a/typedapi/esdsl/rateaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ratelimitsetting.go b/typedapi/esdsl/ratelimitsetting.go index 5c25bebd4c..7cadf6495c 100644 --- a/typedapi/esdsl/ratelimitsetting.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/readonlyurlrepository.go b/typedapi/esdsl/readonlyurlrepository.go index 38f7c1f454..ade31065a3 100644 --- a/typedapi/esdsl/readonlyurlrepository.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/readonlyurlrepositorysettings.go b/typedapi/esdsl/readonlyurlrepositorysettings.go index bcb72d485d..bb7881e293 100644 --- a/typedapi/esdsl/readonlyurlrepositorysettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/redactprocessor.go b/typedapi/esdsl/redactprocessor.go index 25b7f53a74..6eda5fcb31 100644 --- a/typedapi/esdsl/redactprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/regexoptions.go b/typedapi/esdsl/regexoptions.go index 352cd3fbe8..8d4e471c59 100644 --- a/typedapi/esdsl/regexoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -34,7 +34,7 @@ func NewRegexOptions() *_regexOptions { func (s *_regexOptions) Flags(flags string) *_regexOptions { - s.v.Flags = flags + s.v.Flags = &flags return s } diff --git a/typedapi/esdsl/regexpquery.go b/typedapi/esdsl/regexpquery.go index 1ce3ab87ca..05b8043fb7 100644 --- a/typedapi/esdsl/regexpquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/regexvalidation.go b/typedapi/esdsl/regexvalidation.go index 966eb93ec1..d7f80a9b42 100644 --- a/typedapi/esdsl/regexvalidation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/registereddomainprocessor.go b/typedapi/esdsl/registereddomainprocessor.go index 2abee207ea..3d344599ee 100644 --- a/typedapi/esdsl/registereddomainprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/regressioninferenceoptions.go b/typedapi/esdsl/regressioninferenceoptions.go index 550217a88d..6cf34b2bdd 100644 --- a/typedapi/esdsl/regressioninferenceoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/reindexdestination.go b/typedapi/esdsl/reindexdestination.go index 18abd9f752..1755df22a6 100644 --- a/typedapi/esdsl/reindexdestination.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/reindexsource.go b/typedapi/esdsl/reindexsource.go index d37e4c7bbc..3957f02400 100644 --- a/typedapi/esdsl/reindexsource.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/remoteclusterprivileges.go b/typedapi/esdsl/remoteclusterprivileges.go index 52055fcfe5..ec5f8bfc23 100644 --- a/typedapi/esdsl/remoteclusterprivileges.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/remoteindicesprivileges.go b/typedapi/esdsl/remoteindicesprivileges.go index 6c38a57806..ff510bbc97 100644 --- a/typedapi/esdsl/remoteindicesprivileges.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/remotesource.go b/typedapi/esdsl/remotesource.go index 2903bb2e45..b9e660eb79 100644 --- a/typedapi/esdsl/remotesource.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/removeaction.go b/typedapi/esdsl/removeaction.go index bb81f81735..faf48bfeaa 100644 --- a/typedapi/esdsl/removeaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/removeduplicatestokenfilter.go b/typedapi/esdsl/removeduplicatestokenfilter.go index 51305499b2..f8b6cb08ce 100644 --- a/typedapi/esdsl/removeduplicatestokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/removeindexaction.go b/typedapi/esdsl/removeindexaction.go index ab153f384e..290711d55f 100644 --- a/typedapi/esdsl/removeindexaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/removeprocessor.go b/typedapi/esdsl/removeprocessor.go index cf1061ef03..fc9189f533 100644 --- a/typedapi/esdsl/removeprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/renameprocessor.go b/typedapi/esdsl/renameprocessor.go index ac43be1bf8..6ae13ea50e 100644 --- a/typedapi/esdsl/renameprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/replicationaccess.go b/typedapi/esdsl/replicationaccess.go index eb50b96c9e..5919930ce7 100644 --- a/typedapi/esdsl/replicationaccess.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/reportingemailattachment.go b/typedapi/esdsl/reportingemailattachment.go index dc0162e0e8..202028e70c 100644 --- a/typedapi/esdsl/reportingemailattachment.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/repository.go b/typedapi/esdsl/repository.go index ee343402a4..ee9819475f 100644 --- a/typedapi/esdsl/repository.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -44,7 +44,7 @@ func (u *_repository) UnknownRepository(unknown json.RawMessage) *_repository { func (u *_repository) AzureRepository(azurerepository types.AzureRepositoryVariant) *_repository { - u.v = &azurerepository + u.v = azurerepository.AzureRepositoryCaster() return u } @@ -57,7 +57,7 @@ func (u *_azureRepository) RepositoryCaster() *types.Repository { func (u *_repository) GcsRepository(gcsrepository types.GcsRepositoryVariant) *_repository { - u.v = &gcsrepository + u.v = gcsrepository.GcsRepositoryCaster() return u } @@ -70,7 +70,7 @@ func (u *_gcsRepository) RepositoryCaster() *types.Repository { func (u *_repository) S3Repository(s3repository types.S3RepositoryVariant) *_repository { - u.v = &s3repository + u.v = s3repository.S3RepositoryCaster() return u } @@ -83,7 +83,7 @@ func (u *_s3Repository) RepositoryCaster() *types.Repository { func (u *_repository) SharedFileSystemRepository(sharedfilesystemrepository types.SharedFileSystemRepositoryVariant) *_repository { - u.v = &sharedfilesystemrepository + u.v = sharedfilesystemrepository.SharedFileSystemRepositoryCaster() return u } @@ -96,7 +96,7 @@ func (u *_sharedFileSystemRepository) RepositoryCaster() *types.Repository { func (u *_repository) ReadOnlyUrlRepository(readonlyurlrepository types.ReadOnlyUrlRepositoryVariant) *_repository { - u.v = &readonlyurlrepository + u.v = readonlyurlrepository.ReadOnlyUrlRepositoryCaster() return u } @@ -109,7 +109,7 @@ func (u *_readOnlyUrlRepository) RepositoryCaster() *types.Repository { func (u *_repository) SourceOnlyRepository(sourceonlyrepository types.SourceOnlyRepositoryVariant) *_repository { - u.v = &sourceonlyrepository + u.v = sourceonlyrepository.SourceOnlyRepositoryCaster() return u } diff --git a/typedapi/esdsl/requestchatcompletion.go b/typedapi/esdsl/requestchatcompletion.go index 4e193643d9..eef0f8f218 100644 --- a/typedapi/esdsl/requestchatcompletion.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/requestitem.go b/typedapi/esdsl/requestitem.go index 592a2bface..d32df6a829 100644 --- a/typedapi/esdsl/requestitem.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -33,7 +33,7 @@ func NewRequestItem() *_requestItem { func (u *_requestItem) MultisearchHeader(multisearchheader types.MultisearchHeaderVariant) *_requestItem { - u.v = &multisearchheader + u.v = multisearchheader.MultisearchHeaderCaster() return u } @@ -46,7 +46,7 @@ func (u *_multisearchHeader) RequestItemCaster() *types.RequestItem { func (u *_requestItem) TemplateConfig(templateconfig types.TemplateConfigVariant) *_requestItem { - u.v = &templateconfig + u.v = templateconfig.TemplateConfigCaster() return u } diff --git a/typedapi/esdsl/rerouteprocessor.go b/typedapi/esdsl/rerouteprocessor.go index 916e4827e0..4b5326a622 100644 --- a/typedapi/esdsl/rerouteprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rescore.go b/typedapi/esdsl/rescore.go index 460890dcf3..58c48158cb 100644 --- a/typedapi/esdsl/rescore.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rescorequery.go b/typedapi/esdsl/rescorequery.go index d151bd738d..9a2e0aa8af 100644 --- a/typedapi/esdsl/rescorequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rescorerretriever.go b/typedapi/esdsl/rescorerretriever.go new file mode 100644 index 0000000000..ed0c948a87 --- /dev/null +++ b/typedapi/esdsl/rescorerretriever.go @@ -0,0 +1,91 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _rescorerRetriever struct { + v *types.RescorerRetriever +} + +// A retriever that re-scores only the results produced by its child retriever. +func NewRescorerRetriever(retriever types.RetrieverContainerVariant) *_rescorerRetriever { + + tmp := &_rescorerRetriever{v: types.NewRescorerRetriever()} + + tmp.Retriever(retriever) + + return tmp + +} + +func (s *_rescorerRetriever) Filter(filters ...types.QueryVariant) *_rescorerRetriever { + + s.v.Filter = make([]types.Query, len(filters)) + for i, v := range filters { + s.v.Filter[i] = *v.QueryCaster() + } + + return s +} + +func (s *_rescorerRetriever) MinScore(minscore float32) *_rescorerRetriever { + + s.v.MinScore = &minscore + + return s +} + +func (s *_rescorerRetriever) Name_(name_ string) *_rescorerRetriever { + + s.v.Name_ = &name_ + + return s +} + +func (s *_rescorerRetriever) Rescore(rescores ...types.RescoreVariant) *_rescorerRetriever { + + s.v.Rescore = make([]types.Rescore, len(rescores)) + for i, v := range rescores { + s.v.Rescore[i] = *v.RescoreCaster() + } + + return s +} + +func (s *_rescorerRetriever) Retriever(retriever types.RetrieverContainerVariant) *_rescorerRetriever { + + s.v.Retriever = *retriever.RetrieverContainerCaster() + + return s +} + +func (s *_rescorerRetriever) RetrieverContainerCaster() *types.RetrieverContainer { + container := types.NewRetrieverContainer() + + container.Rescorer = s.v + + return container +} + +func (s *_rescorerRetriever) RescorerRetrieverCaster() *types.RescorerRetriever { + return s.v +} diff --git a/typedapi/esdsl/rescorevector.go b/typedapi/esdsl/rescorevector.go index 23728e2d17..ac2c22a986 100644 --- a/typedapi/esdsl/rescorevector.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/restriction.go b/typedapi/esdsl/restriction.go index c67c27954c..ae6eb90d82 100644 --- a/typedapi/esdsl/restriction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/retention.go b/typedapi/esdsl/retention.go index 62a764a5c5..e606268955 100644 --- a/typedapi/esdsl/retention.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/retentionlease.go b/typedapi/esdsl/retentionlease.go index 40a0a87a67..a2fab6e9eb 100644 --- a/typedapi/esdsl/retentionlease.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/retentionpolicy.go b/typedapi/esdsl/retentionpolicy.go index edb419fbb9..49b3d1e205 100644 --- a/typedapi/esdsl/retentionpolicy.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/retentionpolicycontainer.go b/typedapi/esdsl/retentionpolicycontainer.go index 2eeaab2b0f..b9d6c81c17 100644 --- a/typedapi/esdsl/retentionpolicycontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/retrievercontainer.go b/typedapi/esdsl/retrievercontainer.go index adfb29f59c..7fee8d3d3d 100644 --- a/typedapi/esdsl/retrievercontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -53,6 +53,27 @@ func (s *_retrieverContainer) Knn(knn types.KnnRetrieverVariant) *_retrieverCont return s } +func (s *_retrieverContainer) Linear(linear types.LinearRetrieverVariant) *_retrieverContainer { + + s.v.Linear = linear.LinearRetrieverCaster() + + return s +} + +func (s *_retrieverContainer) Pinned(pinned types.PinnedRetrieverVariant) *_retrieverContainer { + + s.v.Pinned = pinned.PinnedRetrieverCaster() + + return s +} + +func (s *_retrieverContainer) Rescorer(rescorer types.RescorerRetrieverVariant) *_retrieverContainer { + + s.v.Rescorer = rescorer.RescorerRetrieverCaster() + + return s +} + func (s *_retrieverContainer) Rrf(rrf types.RRFRetrieverVariant) *_retrieverContainer { s.v.Rrf = rrf.RRFRetrieverCaster() diff --git a/typedapi/esdsl/reversenestedaggregation.go b/typedapi/esdsl/reversenestedaggregation.go index 50c0d0a2e2..d6ab23780d 100644 --- a/typedapi/esdsl/reversenestedaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/reversetokenfilter.go b/typedapi/esdsl/reversetokenfilter.go index ff77983124..6e346dbfe5 100644 --- a/typedapi/esdsl/reversetokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/roledescriptor.go b/typedapi/esdsl/roledescriptor.go index 65b8fc4897..feb5f5f348 100644 --- a/typedapi/esdsl/roledescriptor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rolemappingrule.go b/typedapi/esdsl/rolemappingrule.go index 20a35944ce..1f85e0bbd8 100644 --- a/typedapi/esdsl/rolemappingrule.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rolequerycontainer.go b/typedapi/esdsl/rolequerycontainer.go index 353d90c041..4c7bffe972 100644 --- a/typedapi/esdsl/rolequerycontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/roletemplate.go b/typedapi/esdsl/roletemplate.go index a068e8e59f..40e8617960 100644 --- a/typedapi/esdsl/roletemplate.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/roletemplateinlinequery.go b/typedapi/esdsl/roletemplateinlinequery.go index f10d648198..6fe0a79a40 100644 --- a/typedapi/esdsl/roletemplateinlinequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -40,7 +40,7 @@ func (u *_roleTemplateInlineQuery) String(string string) *_roleTemplateInlineQue func (u *_roleTemplateInlineQuery) Query(query types.QueryVariant) *_roleTemplateInlineQuery { - u.v = &query + u.v = query.QueryCaster() return u } diff --git a/typedapi/esdsl/roletemplatequery.go b/typedapi/esdsl/roletemplatequery.go index 6c4fc2f01e..9c222e6ee2 100644 --- a/typedapi/esdsl/roletemplatequery.go +++ b/typedapi/esdsl/roletemplatequery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/roletemplatescript.go b/typedapi/esdsl/roletemplatescript.go index 4b1fce6499..f472dd8083 100644 --- a/typedapi/esdsl/roletemplatescript.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rolloveraction.go b/typedapi/esdsl/rolloveraction.go index 375e4ae8eb..b29d8096ce 100644 --- a/typedapi/esdsl/rolloveraction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rolloverconditions.go b/typedapi/esdsl/rolloverconditions.go index 10b23581d1..175379a34f 100644 --- a/typedapi/esdsl/rolloverconditions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/romaniananalyzer.go b/typedapi/esdsl/romaniananalyzer.go index 8108bd3b55..ceffd8e48d 100644 --- a/typedapi/esdsl/romaniananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_romanianAnalyzer) StemExclusion(stemexclusions ...string) *_romanianAn return s } -func (s *_romanianAnalyzer) Stopwords(stopwords ...string) *_romanianAnalyzer { +func (s *_romanianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_romanianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/routingfield.go b/typedapi/esdsl/routingfield.go index 850bf069bb..d1e00df22d 100644 --- a/typedapi/esdsl/routingfield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rrfrank.go b/typedapi/esdsl/rrfrank.go index 2d4a9b5f72..f74f1e89e4 100644 --- a/typedapi/esdsl/rrfrank.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rrfretriever.go b/typedapi/esdsl/rrfretriever.go index f199d7bcda..bcb26950ba 100644 --- a/typedapi/esdsl/rrfretriever.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -33,6 +33,16 @@ func NewRRFRetriever() *_rRFRetriever { } +func (s *_rRFRetriever) Fields(fields ...string) *_rRFRetriever { + + for _, v := range fields { + + s.v.Fields = append(s.v.Fields, v) + + } + return s +} + func (s *_rRFRetriever) Filter(filters ...types.QueryVariant) *_rRFRetriever { s.v.Filter = make([]types.Query, len(filters)) @@ -50,6 +60,20 @@ func (s *_rRFRetriever) MinScore(minscore float32) *_rRFRetriever { return s } +func (s *_rRFRetriever) Name_(name_ string) *_rRFRetriever { + + s.v.Name_ = &name_ + + return s +} + +func (s *_rRFRetriever) Query(query string) *_rRFRetriever { + + s.v.Query = &query + + return s +} + func (s *_rRFRetriever) RankConstant(rankconstant int) *_rRFRetriever { s.v.RankConstant = &rankconstant diff --git a/typedapi/esdsl/rulecondition.go b/typedapi/esdsl/rulecondition.go index 0ae651993a..cae818760a 100644 --- a/typedapi/esdsl/rulecondition.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/rulequery.go b/typedapi/esdsl/rulequery.go index 39ec3e0b96..48ef04c034 100644 --- a/typedapi/esdsl/rulequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -70,13 +70,18 @@ func (s *_ruleQuery) QueryName_(queryname_ string) *_ruleQuery { return s } -func (s *_ruleQuery) RulesetIds(rulesetids ...string) *_ruleQuery { +func (s *_ruleQuery) RulesetId(rulesetid string) *_ruleQuery { + + s.v.RulesetId = &rulesetid + + return s +} - for _, v := range rulesetids { +func (s *_ruleQuery) RulesetIds(rulesetids ...string) *_ruleQuery { - s.v.RulesetIds = append(s.v.RulesetIds, v) + s.v.RulesetIds = make([]string, len(rulesetids)) + s.v.RulesetIds = rulesetids - } return s } diff --git a/typedapi/esdsl/ruleretriever.go b/typedapi/esdsl/ruleretriever.go index 237af546ba..d78eb3d003 100644 --- a/typedapi/esdsl/ruleretriever.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -67,6 +67,13 @@ func (s *_ruleRetriever) MinScore(minscore float32) *_ruleRetriever { return s } +func (s *_ruleRetriever) Name_(name_ string) *_ruleRetriever { + + s.v.Name_ = &name_ + + return s +} + func (s *_ruleRetriever) RankWindowSize(rankwindowsize int) *_ruleRetriever { s.v.RankWindowSize = &rankwindowsize @@ -83,11 +90,9 @@ func (s *_ruleRetriever) Retriever(retriever types.RetrieverContainerVariant) *_ func (s *_ruleRetriever) RulesetIds(rulesetids ...string) *_ruleRetriever { - for _, v := range rulesetids { - - s.v.RulesetIds = append(s.v.RulesetIds, v) + s.v.RulesetIds = make([]string, len(rulesetids)) + s.v.RulesetIds = rulesetids - } return s } diff --git a/typedapi/esdsl/runtimefield.go b/typedapi/esdsl/runtimefield.go index 8c5a62a893..ef8780fca3 100644 --- a/typedapi/esdsl/runtimefield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/runtimefieldfetchfields.go b/typedapi/esdsl/runtimefieldfetchfields.go index 78407e244a..07a3b265a6 100644 --- a/typedapi/esdsl/runtimefieldfetchfields.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/runtimefields.go b/typedapi/esdsl/runtimefields.go index daebed9d83..e3ac3c51be 100644 --- a/typedapi/esdsl/runtimefields.go +++ b/typedapi/esdsl/runtimefields.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/russiananalyzer.go b/typedapi/esdsl/russiananalyzer.go index 9150c0d946..6f99f1a147 100644 --- a/typedapi/esdsl/russiananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_russianAnalyzer) StemExclusion(stemexclusions ...string) *_russianAnal return s } -func (s *_russianAnalyzer) Stopwords(stopwords ...string) *_russianAnalyzer { +func (s *_russianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_russianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/russianstemtokenfilter.go b/typedapi/esdsl/russianstemtokenfilter.go new file mode 100644 index 0000000000..bc2f76a2b1 --- /dev/null +++ b/typedapi/esdsl/russianstemtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _russianStemTokenFilter struct { + v *types.RussianStemTokenFilter +} + +func NewRussianStemTokenFilter() *_russianStemTokenFilter { + + return &_russianStemTokenFilter{v: types.NewRussianStemTokenFilter()} + +} + +func (s *_russianStemTokenFilter) Version(versionstring string) *_russianStemTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_russianStemTokenFilter) RussianStemTokenFilterCaster() *types.RussianStemTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/s3repository.go b/typedapi/esdsl/s3repository.go index fe744bdd9b..3a20cc8915 100644 --- a/typedapi/esdsl/s3repository.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/s3repositorysettings.go b/typedapi/esdsl/s3repositorysettings.go index 61e99ffdd4..ee22a6f39f 100644 --- a/typedapi/esdsl/s3repositorysettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/samplediversity.go b/typedapi/esdsl/samplediversity.go index 84782e432b..55584f638a 100644 --- a/typedapi/esdsl/samplediversity.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sampleraggregation.go b/typedapi/esdsl/sampleraggregation.go index 32798fea76..e46a305b39 100644 --- a/typedapi/esdsl/sampleraggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scalarvalue.go b/typedapi/esdsl/scalarvalue.go index 516393ac4f..59de57c9af 100644 --- a/typedapi/esdsl/scalarvalue.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scaledfloatnumberproperty.go b/typedapi/esdsl/scaledfloatnumberproperty.go index be40f2a90c..49ec94a414 100644 --- a/typedapi/esdsl/scaledfloatnumberproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scandinavianfoldingtokenfilter.go b/typedapi/esdsl/scandinavianfoldingtokenfilter.go new file mode 100644 index 0000000000..2f3082646a --- /dev/null +++ b/typedapi/esdsl/scandinavianfoldingtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _scandinavianFoldingTokenFilter struct { + v *types.ScandinavianFoldingTokenFilter +} + +func NewScandinavianFoldingTokenFilter() *_scandinavianFoldingTokenFilter { + + return &_scandinavianFoldingTokenFilter{v: types.NewScandinavianFoldingTokenFilter()} + +} + +func (s *_scandinavianFoldingTokenFilter) Version(versionstring string) *_scandinavianFoldingTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_scandinavianFoldingTokenFilter) ScandinavianFoldingTokenFilterCaster() *types.ScandinavianFoldingTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/scandinaviannormalizationtokenfilter.go b/typedapi/esdsl/scandinaviannormalizationtokenfilter.go new file mode 100644 index 0000000000..07a11ceccd --- /dev/null +++ b/typedapi/esdsl/scandinaviannormalizationtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _scandinavianNormalizationTokenFilter struct { + v *types.ScandinavianNormalizationTokenFilter +} + +func NewScandinavianNormalizationTokenFilter() *_scandinavianNormalizationTokenFilter { + + return &_scandinavianNormalizationTokenFilter{v: types.NewScandinavianNormalizationTokenFilter()} + +} + +func (s *_scandinavianNormalizationTokenFilter) Version(versionstring string) *_scandinavianNormalizationTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_scandinavianNormalizationTokenFilter) ScandinavianNormalizationTokenFilterCaster() *types.ScandinavianNormalizationTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/schedulecontainer.go b/typedapi/esdsl/schedulecontainer.go index 89ccc77b2e..247f302920 100644 --- a/typedapi/esdsl/schedulecontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scheduletimeofday.go b/typedapi/esdsl/scheduletimeofday.go index 670b877163..7d24939f17 100644 --- a/typedapi/esdsl/scheduletimeofday.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -40,7 +40,7 @@ func (u *_scheduleTimeOfDay) String(string string) *_scheduleTimeOfDay { func (u *_scheduleTimeOfDay) HourAndMinute(hourandminute types.HourAndMinuteVariant) *_scheduleTimeOfDay { - u.v = &hourandminute + u.v = hourandminute.HourAndMinuteCaster() return u } diff --git a/typedapi/esdsl/scheduletriggerevent.go b/typedapi/esdsl/scheduletriggerevent.go index 4f6bcfac7d..fc1048c5e9 100644 --- a/typedapi/esdsl/scheduletriggerevent.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/schedulingconfiguration.go b/typedapi/esdsl/schedulingconfiguration.go index 194b6c6730..263df2e067 100644 --- a/typedapi/esdsl/schedulingconfiguration.go +++ b/typedapi/esdsl/schedulingconfiguration.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scoresort.go b/typedapi/esdsl/scoresort.go index 1b78cdec61..c0b3a99462 100644 --- a/typedapi/esdsl/scoresort.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/script.go b/typedapi/esdsl/script.go index 5e710c5b18..48faabcc2c 100644 --- a/typedapi/esdsl/script.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scriptcondition.go b/typedapi/esdsl/scriptcondition.go index 367a9b332f..518c230988 100644 --- a/typedapi/esdsl/scriptcondition.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scriptedheuristic.go b/typedapi/esdsl/scriptedheuristic.go index fabb558dae..c7c4dc0546 100644 --- a/typedapi/esdsl/scriptedheuristic.go +++ b/typedapi/esdsl/scriptedheuristic.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scriptedmetricaggregation.go b/typedapi/esdsl/scriptedmetricaggregation.go index c4f58b5a26..23908e94dd 100644 --- a/typedapi/esdsl/scriptedmetricaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scriptfield.go b/typedapi/esdsl/scriptfield.go index 5b6d4b7a0c..c9be656a31 100644 --- a/typedapi/esdsl/scriptfield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scriptprocessor.go b/typedapi/esdsl/scriptprocessor.go index 4bbd83afeb..7257b8bcc8 100644 --- a/typedapi/esdsl/scriptprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scriptquery.go b/typedapi/esdsl/scriptquery.go index 6018678836..a75a364713 100644 --- a/typedapi/esdsl/scriptquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scriptscorefunction.go b/typedapi/esdsl/scriptscorefunction.go index b65d1dee4e..9a3696b52f 100644 --- a/typedapi/esdsl/scriptscorefunction.go +++ b/typedapi/esdsl/scriptscorefunction.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scriptscorequery.go b/typedapi/esdsl/scriptscorequery.go index 0119600628..b0f78fa73b 100644 --- a/typedapi/esdsl/scriptscorequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scriptsort.go b/typedapi/esdsl/scriptsort.go index 3a78f2827b..cf01df076d 100644 --- a/typedapi/esdsl/scriptsort.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scriptsource.go b/typedapi/esdsl/scriptsource.go index e3131c0890..23ca089105 100644 --- a/typedapi/esdsl/scriptsource.go +++ b/typedapi/esdsl/scriptsource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -40,7 +40,7 @@ func (u *_scriptSource) String(string string) *_scriptSource { func (u *_scriptSource) SearchRequestBody(searchrequestbody types.SearchRequestBodyVariant) *_scriptSource { - u.v = &searchrequestbody + u.v = searchrequestbody.SearchRequestBodyCaster() return u } diff --git a/typedapi/esdsl/scripttransform.go b/typedapi/esdsl/scripttransform.go index 6d59bde162..dff411e124 100644 --- a/typedapi/esdsl/scripttransform.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/scrollids.go b/typedapi/esdsl/scrollids.go index 94d859e43e..662f665131 100644 --- a/typedapi/esdsl/scrollids.go +++ b/typedapi/esdsl/scrollids.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/searchablesnapshotaction.go b/typedapi/esdsl/searchablesnapshotaction.go index 4b2440c961..87ed48f8c8 100644 --- a/typedapi/esdsl/searchablesnapshotaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/searchaccess.go b/typedapi/esdsl/searchaccess.go index 69a537c697..2ff895c168 100644 --- a/typedapi/esdsl/searchaccess.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/searchapplicationparameters.go b/typedapi/esdsl/searchapplicationparameters.go index 3724449826..14532bd003 100644 --- a/typedapi/esdsl/searchapplicationparameters.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/searchapplicationtemplate.go b/typedapi/esdsl/searchapplicationtemplate.go index 39f24b6179..70a095e915 100644 --- a/typedapi/esdsl/searchapplicationtemplate.go +++ b/typedapi/esdsl/searchapplicationtemplate.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/searchasyoutypeproperty.go b/typedapi/esdsl/searchasyoutypeproperty.go index 1b89330520..ec91d7b17a 100644 --- a/typedapi/esdsl/searchasyoutypeproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/searchidle.go b/typedapi/esdsl/searchidle.go index b50062e625..d23eb89c2f 100644 --- a/typedapi/esdsl/searchidle.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/searchinput.go b/typedapi/esdsl/searchinput.go index 7941d4ece6..69de813193 100644 --- a/typedapi/esdsl/searchinput.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/searchinputrequestbody.go b/typedapi/esdsl/searchinputrequestbody.go index 6e727c52a0..3aed95e38c 100644 --- a/typedapi/esdsl/searchinputrequestbody.go +++ b/typedapi/esdsl/searchinputrequestbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/searchinputrequestdefinition.go b/typedapi/esdsl/searchinputrequestdefinition.go index 2e9d4384f3..cda9ce2d1f 100644 --- a/typedapi/esdsl/searchinputrequestdefinition.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/searchrequestbody.go b/typedapi/esdsl/searchrequestbody.go index b0a24aa9c8..02e1e0245f 100644 --- a/typedapi/esdsl/searchrequestbody.go +++ b/typedapi/esdsl/searchrequestbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/searchtemplaterequestbody.go b/typedapi/esdsl/searchtemplaterequestbody.go index 87f1c4ff85..003b3acf1d 100644 --- a/typedapi/esdsl/searchtemplaterequestbody.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/searchtransform.go b/typedapi/esdsl/searchtransform.go index 9322ea88b0..2db2f5bfee 100644 --- a/typedapi/esdsl/searchtransform.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/securitysettings.go b/typedapi/esdsl/securitysettings.go index 581a0ea696..3e57470467 100644 --- a/typedapi/esdsl/securitysettings.go +++ b/typedapi/esdsl/securitysettings.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/selectoption.go b/typedapi/esdsl/selectoption.go index c1d1fe7d0d..2f62cfddaf 100644 --- a/typedapi/esdsl/selectoption.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/semanticquery.go b/typedapi/esdsl/semanticquery.go index 3970e706bc..e94dde3689 100644 --- a/typedapi/esdsl/semanticquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/semantictextproperty.go b/typedapi/esdsl/semantictextproperty.go index 388adff385..b0f063ca1a 100644 --- a/typedapi/esdsl/semantictextproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/serbiananalyzer.go b/typedapi/esdsl/serbiananalyzer.go index bbfb5b2171..c1fa20e8fd 100644 --- a/typedapi/esdsl/serbiananalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_serbianAnalyzer) StemExclusion(stemexclusions ...string) *_serbianAnal return s } -func (s *_serbianAnalyzer) Stopwords(stopwords ...string) *_serbianAnalyzer { +func (s *_serbianAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_serbianAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/serbiannormalizationtokenfilter.go b/typedapi/esdsl/serbiannormalizationtokenfilter.go new file mode 100644 index 0000000000..826a250938 --- /dev/null +++ b/typedapi/esdsl/serbiannormalizationtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _serbianNormalizationTokenFilter struct { + v *types.SerbianNormalizationTokenFilter +} + +func NewSerbianNormalizationTokenFilter() *_serbianNormalizationTokenFilter { + + return &_serbianNormalizationTokenFilter{v: types.NewSerbianNormalizationTokenFilter()} + +} + +func (s *_serbianNormalizationTokenFilter) Version(versionstring string) *_serbianNormalizationTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_serbianNormalizationTokenFilter) SerbianNormalizationTokenFilterCaster() *types.SerbianNormalizationTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/serialdifferencingaggregation.go b/typedapi/esdsl/serialdifferencingaggregation.go index 843dd68e3b..86b36b0c70 100644 --- a/typedapi/esdsl/serialdifferencingaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/setpriorityaction.go b/typedapi/esdsl/setpriorityaction.go index 6d38e103ff..29c3bac438 100644 --- a/typedapi/esdsl/setpriorityaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/setprocessor.go b/typedapi/esdsl/setprocessor.go index 8a6260323e..15281727e3 100644 --- a/typedapi/esdsl/setprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/setsecurityuserprocessor.go b/typedapi/esdsl/setsecurityuserprocessor.go index 4be2fd99fd..18ebf2c71a 100644 --- a/typedapi/esdsl/setsecurityuserprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settings.go b/typedapi/esdsl/settings.go index 196096d75f..093dfefa87 100644 --- a/typedapi/esdsl/settings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settingsanalyze.go b/typedapi/esdsl/settingsanalyze.go index 41c5d104be..d19d68b0e2 100644 --- a/typedapi/esdsl/settingsanalyze.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settingshighlight.go b/typedapi/esdsl/settingshighlight.go index 35f637877e..fd1053095d 100644 --- a/typedapi/esdsl/settingshighlight.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settingsquerystring.go b/typedapi/esdsl/settingsquerystring.go index 962e82decf..c8df69e856 100644 --- a/typedapi/esdsl/settingsquerystring.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settingssearch.go b/typedapi/esdsl/settingssearch.go index 031987af2b..dc5eb59dac 100644 --- a/typedapi/esdsl/settingssearch.go +++ b/typedapi/esdsl/settingssearch.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settingssimilarity.go b/typedapi/esdsl/settingssimilarity.go index fc360be0c2..d21f3bc582 100644 --- a/typedapi/esdsl/settingssimilarity.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -44,7 +44,7 @@ func (u *_settingsSimilarity) UnknownSettingsSimilarity(unknown json.RawMessage) func (u *_settingsSimilarity) SettingsSimilarityBm25(settingssimilaritybm25 types.SettingsSimilarityBm25Variant) *_settingsSimilarity { - u.v = &settingssimilaritybm25 + u.v = settingssimilaritybm25.SettingsSimilarityBm25Caster() return u } @@ -57,7 +57,7 @@ func (u *_settingsSimilarityBm25) SettingsSimilarityCaster() *types.SettingsSimi func (u *_settingsSimilarity) SettingsSimilarityBoolean(settingssimilarityboolean types.SettingsSimilarityBooleanVariant) *_settingsSimilarity { - u.v = &settingssimilarityboolean + u.v = settingssimilarityboolean.SettingsSimilarityBooleanCaster() return u } @@ -70,7 +70,7 @@ func (u *_settingsSimilarityBoolean) SettingsSimilarityCaster() *types.SettingsS func (u *_settingsSimilarity) SettingsSimilarityDfi(settingssimilaritydfi types.SettingsSimilarityDfiVariant) *_settingsSimilarity { - u.v = &settingssimilaritydfi + u.v = settingssimilaritydfi.SettingsSimilarityDfiCaster() return u } @@ -83,7 +83,7 @@ func (u *_settingsSimilarityDfi) SettingsSimilarityCaster() *types.SettingsSimil func (u *_settingsSimilarity) SettingsSimilarityDfr(settingssimilaritydfr types.SettingsSimilarityDfrVariant) *_settingsSimilarity { - u.v = &settingssimilaritydfr + u.v = settingssimilaritydfr.SettingsSimilarityDfrCaster() return u } @@ -96,7 +96,7 @@ func (u *_settingsSimilarityDfr) SettingsSimilarityCaster() *types.SettingsSimil func (u *_settingsSimilarity) SettingsSimilarityIb(settingssimilarityib types.SettingsSimilarityIbVariant) *_settingsSimilarity { - u.v = &settingssimilarityib + u.v = settingssimilarityib.SettingsSimilarityIbCaster() return u } @@ -109,7 +109,7 @@ func (u *_settingsSimilarityIb) SettingsSimilarityCaster() *types.SettingsSimila func (u *_settingsSimilarity) SettingsSimilarityLmd(settingssimilaritylmd types.SettingsSimilarityLmdVariant) *_settingsSimilarity { - u.v = &settingssimilaritylmd + u.v = settingssimilaritylmd.SettingsSimilarityLmdCaster() return u } @@ -122,7 +122,7 @@ func (u *_settingsSimilarityLmd) SettingsSimilarityCaster() *types.SettingsSimil func (u *_settingsSimilarity) SettingsSimilarityLmj(settingssimilaritylmj types.SettingsSimilarityLmjVariant) *_settingsSimilarity { - u.v = &settingssimilaritylmj + u.v = settingssimilaritylmj.SettingsSimilarityLmjCaster() return u } @@ -135,7 +135,7 @@ func (u *_settingsSimilarityLmj) SettingsSimilarityCaster() *types.SettingsSimil func (u *_settingsSimilarity) SettingsSimilarityScripted(settingssimilarityscripted types.SettingsSimilarityScriptedVariant) *_settingsSimilarity { - u.v = &settingssimilarityscripted + u.v = settingssimilarityscripted.SettingsSimilarityScriptedCaster() return u } diff --git a/typedapi/esdsl/settingssimilaritybm25.go b/typedapi/esdsl/settingssimilaritybm25.go index 15dcc9d749..f49d2d472d 100644 --- a/typedapi/esdsl/settingssimilaritybm25.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settingssimilarityboolean.go b/typedapi/esdsl/settingssimilarityboolean.go index 0eff8cd304..e92dc879e0 100644 --- a/typedapi/esdsl/settingssimilarityboolean.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settingssimilaritydfi.go b/typedapi/esdsl/settingssimilaritydfi.go index 1c7b429545..7c82623402 100644 --- a/typedapi/esdsl/settingssimilaritydfi.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settingssimilaritydfr.go b/typedapi/esdsl/settingssimilaritydfr.go index d07c34d2a1..a21b08a2ff 100644 --- a/typedapi/esdsl/settingssimilaritydfr.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settingssimilarityib.go b/typedapi/esdsl/settingssimilarityib.go index 12c39d77d4..c20f6396b9 100644 --- a/typedapi/esdsl/settingssimilarityib.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settingssimilaritylmd.go b/typedapi/esdsl/settingssimilaritylmd.go index 9e8fa63eb6..dbb1a05d8e 100644 --- a/typedapi/esdsl/settingssimilaritylmd.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settingssimilaritylmj.go b/typedapi/esdsl/settingssimilaritylmj.go index cbda091d29..a4dc211e4d 100644 --- a/typedapi/esdsl/settingssimilaritylmj.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/settingssimilarityscripted.go b/typedapi/esdsl/settingssimilarityscripted.go index 429100e9f5..bccec5ac2e 100644 --- a/typedapi/esdsl/settingssimilarityscripted.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/shapefieldquery.go b/typedapi/esdsl/shapefieldquery.go index b21e732d88..2815b0affb 100644 --- a/typedapi/esdsl/shapefieldquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/shapeproperty.go b/typedapi/esdsl/shapeproperty.go index 7233bc35ed..41fe28af2c 100644 --- a/typedapi/esdsl/shapeproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/shapequery.go b/typedapi/esdsl/shapequery.go index 382753c0bf..29f03c0fd2 100644 --- a/typedapi/esdsl/shapequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sharedfilesystemrepository.go b/typedapi/esdsl/sharedfilesystemrepository.go index d455241751..3041a6b8f6 100644 --- a/typedapi/esdsl/sharedfilesystemrepository.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sharedfilesystemrepositorysettings.go b/typedapi/esdsl/sharedfilesystemrepositorysettings.go index 42ada2419f..88204772d0 100644 --- a/typedapi/esdsl/sharedfilesystemrepositorysettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/shingletokenfilter.go b/typedapi/esdsl/shingletokenfilter.go index 78baab3407..285fee4fe5 100644 --- a/typedapi/esdsl/shingletokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -39,16 +39,16 @@ func (s *_shingleTokenFilter) FillerToken(fillertoken string) *_shingleTokenFilt return s } -func (s *_shingleTokenFilter) MaxShingleSize(maxshinglesize string) *_shingleTokenFilter { +func (s *_shingleTokenFilter) MaxShingleSize(stringifiedinteger types.StringifiedintegerVariant) *_shingleTokenFilter { - s.v.MaxShingleSize = maxshinglesize + s.v.MaxShingleSize = *stringifiedinteger.StringifiedintegerCaster() return s } -func (s *_shingleTokenFilter) MinShingleSize(minshinglesize string) *_shingleTokenFilter { +func (s *_shingleTokenFilter) MinShingleSize(stringifiedinteger types.StringifiedintegerVariant) *_shingleTokenFilter { - s.v.MinShingleSize = minshinglesize + s.v.MinShingleSize = *stringifiedinteger.StringifiedintegerCaster() return s } diff --git a/typedapi/esdsl/shortnumberproperty.go b/typedapi/esdsl/shortnumberproperty.go index 5aaa5d55a4..b0114b74e9 100644 --- a/typedapi/esdsl/shortnumberproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/shrinkaction.go b/typedapi/esdsl/shrinkaction.go index 0b79bfe72d..4ab653ea08 100644 --- a/typedapi/esdsl/shrinkaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/significanttermsaggregation.go b/typedapi/esdsl/significanttermsaggregation.go index a6503b61fd..5593e214d7 100644 --- a/typedapi/esdsl/significanttermsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/significanttextaggregation.go b/typedapi/esdsl/significanttextaggregation.go index 0667c49a00..131c2cb421 100644 --- a/typedapi/esdsl/significanttextaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/simpleanalyzer.go b/typedapi/esdsl/simpleanalyzer.go index fde5e58296..ade08ae7e2 100644 --- a/typedapi/esdsl/simpleanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/simplemovingaverageaggregation.go b/typedapi/esdsl/simplemovingaverageaggregation.go index 93bee5de6c..20005b784b 100644 --- a/typedapi/esdsl/simplemovingaverageaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/simplepatternsplittokenizer.go b/typedapi/esdsl/simplepatternsplittokenizer.go index 8516708076..57d2a91675 100644 --- a/typedapi/esdsl/simplepatternsplittokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/simplepatterntokenizer.go b/typedapi/esdsl/simplepatterntokenizer.go index 436d2b5e76..00ac0a79d2 100644 --- a/typedapi/esdsl/simplepatterntokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/simplequerystringflags.go b/typedapi/esdsl/simplequerystringflags.go index 85ec581d59..317d2af6df 100644 --- a/typedapi/esdsl/simplequerystringflags.go +++ b/typedapi/esdsl/simplequerystringflags.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/simplequerystringquery.go b/typedapi/esdsl/simplequerystringquery.go index d33d959d8f..8e7e7c81be 100644 --- a/typedapi/esdsl/simplequerystringquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -29,8 +29,8 @@ type _simpleQueryStringQuery struct { v *types.SimpleQueryStringQuery } -// Returns users based on a provided query string, using a parser with a limited -// but fault-tolerant syntax. +// Returns documents based on a provided query string, using a parser with a +// limited but fault-tolerant syntax. func NewSimpleQueryStringQuery(query string) *_simpleQueryStringQuery { tmp := &_simpleQueryStringQuery{v: types.NewSimpleQueryStringQuery()} diff --git a/typedapi/esdsl/simulatedactions.go b/typedapi/esdsl/simulatedactions.go index 43100816e6..6f9a9c6d50 100644 --- a/typedapi/esdsl/simulatedactions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sizefield.go b/typedapi/esdsl/sizefield.go index 3d5c57b5c5..e70c085724 100644 --- a/typedapi/esdsl/sizefield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/slackaction.go b/typedapi/esdsl/slackaction.go index 3dfb249d71..05a4bebe99 100644 --- a/typedapi/esdsl/slackaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/slackattachment.go b/typedapi/esdsl/slackattachment.go index 422e729fc0..adf3aa5bbc 100644 --- a/typedapi/esdsl/slackattachment.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/slackattachmentfield.go b/typedapi/esdsl/slackattachmentfield.go index 511ba9ca45..3e5cf10fd3 100644 --- a/typedapi/esdsl/slackattachmentfield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/slackdynamicattachment.go b/typedapi/esdsl/slackdynamicattachment.go index 9322b9024e..66a720691b 100644 --- a/typedapi/esdsl/slackdynamicattachment.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/slackmessage.go b/typedapi/esdsl/slackmessage.go index 7cdf675a48..c0d9193fb2 100644 --- a/typedapi/esdsl/slackmessage.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/slicedscroll.go b/typedapi/esdsl/slicedscroll.go index ce4822b00c..66321d7e4a 100644 --- a/typedapi/esdsl/slicedscroll.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/slowlogsettings.go b/typedapi/esdsl/slowlogsettings.go index ad93e73018..b6958dbd91 100644 --- a/typedapi/esdsl/slowlogsettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/slowlogtresholdlevels.go b/typedapi/esdsl/slowlogtresholdlevels.go index 031b4a6aa8..7a9c57766f 100644 --- a/typedapi/esdsl/slowlogtresholdlevels.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/slowlogtresholds.go b/typedapi/esdsl/slowlogtresholds.go index a1edf6227f..3e99d714c0 100644 --- a/typedapi/esdsl/slowlogtresholds.go +++ b/typedapi/esdsl/slowlogtresholds.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/smoothingmodelcontainer.go b/typedapi/esdsl/smoothingmodelcontainer.go index a0ca9b2360..b650f4cbcd 100644 --- a/typedapi/esdsl/smoothingmodelcontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/snowballanalyzer.go b/typedapi/esdsl/snowballanalyzer.go index 4d29a49a43..18ffbb79a4 100644 --- a/typedapi/esdsl/snowballanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -45,9 +45,9 @@ func (s *_snowballAnalyzer) Language(language snowballlanguage.SnowballLanguage) return s } -func (s *_snowballAnalyzer) Stopwords(stopwords ...string) *_snowballAnalyzer { +func (s *_snowballAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_snowballAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/snowballtokenfilter.go b/typedapi/esdsl/snowballtokenfilter.go index ff7f8ee1c8..bffdb19e30 100644 --- a/typedapi/esdsl/snowballtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/softdeletes.go b/typedapi/esdsl/softdeletes.go index eee59f9a75..3a926c335c 100644 --- a/typedapi/esdsl/softdeletes.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/soranianalyzer.go b/typedapi/esdsl/soranianalyzer.go index 1084c0036c..05657727d9 100644 --- a/typedapi/esdsl/soranianalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_soraniAnalyzer) StemExclusion(stemexclusions ...string) *_soraniAnalyz return s } -func (s *_soraniAnalyzer) Stopwords(stopwords ...string) *_soraniAnalyzer { +func (s *_soraniAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_soraniAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/soraninormalizationtokenfilter.go b/typedapi/esdsl/soraninormalizationtokenfilter.go new file mode 100644 index 0000000000..a30c77f00f --- /dev/null +++ b/typedapi/esdsl/soraninormalizationtokenfilter.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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _soraniNormalizationTokenFilter struct { + v *types.SoraniNormalizationTokenFilter +} + +func NewSoraniNormalizationTokenFilter() *_soraniNormalizationTokenFilter { + + return &_soraniNormalizationTokenFilter{v: types.NewSoraniNormalizationTokenFilter()} + +} + +func (s *_soraniNormalizationTokenFilter) Version(versionstring string) *_soraniNormalizationTokenFilter { + + s.v.Version = &versionstring + + return s +} + +func (s *_soraniNormalizationTokenFilter) SoraniNormalizationTokenFilterCaster() *types.SoraniNormalizationTokenFilter { + return s.v +} diff --git a/typedapi/esdsl/sort.go b/typedapi/esdsl/sort.go index 32a6294660..40f19f137a 100644 --- a/typedapi/esdsl/sort.go +++ b/typedapi/esdsl/sort.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sortcombinations.go b/typedapi/esdsl/sortcombinations.go index 580e1db569..3edab19a3d 100644 --- a/typedapi/esdsl/sortcombinations.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -40,7 +40,7 @@ func (u *_sortCombinations) Field(field string) *_sortCombinations { func (u *_sortCombinations) SortOptions(sortoptions types.SortOptionsVariant) *_sortCombinations { - u.v = &sortoptions + u.v = sortoptions.SortOptionsCaster() return u } diff --git a/typedapi/esdsl/sortoptions.go b/typedapi/esdsl/sortoptions.go index 971c159425..beacfcdffe 100644 --- a/typedapi/esdsl/sortoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sortprocessor.go b/typedapi/esdsl/sortprocessor.go index 270c0fa1f0..8183f60dbe 100644 --- a/typedapi/esdsl/sortprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sourceconfig.go b/typedapi/esdsl/sourceconfig.go index b62a60521c..e2a4f06d74 100644 --- a/typedapi/esdsl/sourceconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -40,7 +40,7 @@ func (u *_sourceConfig) Bool(bool bool) *_sourceConfig { func (u *_sourceConfig) SourceFilter(sourcefilter types.SourceFilterVariant) *_sourceConfig { - u.v = &sourcefilter + u.v = sourcefilter.SourceFilterCaster() return u } diff --git a/typedapi/esdsl/sourcefield.go b/typedapi/esdsl/sourcefield.go index e6ec42c7fb..962ee02f0f 100644 --- a/typedapi/esdsl/sourcefield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sourcefilter.go b/typedapi/esdsl/sourcefilter.go index db0df88bb6..2baf3ee68c 100644 --- a/typedapi/esdsl/sourcefilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -32,6 +32,13 @@ func NewSourceFilter() *_sourceFilter { } +func (s *_sourceFilter) ExcludeVectors(excludevectors bool) *_sourceFilter { + + s.v.ExcludeVectors = &excludevectors + + return s +} + func (s *_sourceFilter) Excludes(fields ...string) *_sourceFilter { s.v.Excludes = fields diff --git a/typedapi/esdsl/sourceindex.go b/typedapi/esdsl/sourceindex.go index 3bda9e9177..cc7fc3778a 100644 --- a/typedapi/esdsl/sourceindex.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sourceonlyrepository.go b/typedapi/esdsl/sourceonlyrepository.go index 74555497ad..df512afc0f 100644 --- a/typedapi/esdsl/sourceonlyrepository.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sourceonlyrepositorysettings.go b/typedapi/esdsl/sourceonlyrepositorysettings.go index 8a2105976a..10ab00593f 100644 --- a/typedapi/esdsl/sourceonlyrepositorysettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/spancontainingquery.go b/typedapi/esdsl/spancontainingquery.go index 69e079b42b..acd63d063c 100644 --- a/typedapi/esdsl/spancontainingquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/spanfieldmaskingquery.go b/typedapi/esdsl/spanfieldmaskingquery.go index 58ec9ac12b..ad0bc32961 100644 --- a/typedapi/esdsl/spanfieldmaskingquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/spanfirstquery.go b/typedapi/esdsl/spanfirstquery.go index b9ea34dc82..b4fe796b15 100644 --- a/typedapi/esdsl/spanfirstquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/spangapquery.go b/typedapi/esdsl/spangapquery.go index 9a8cd186e2..e79c814071 100644 --- a/typedapi/esdsl/spangapquery.go +++ b/typedapi/esdsl/spangapquery.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/spanishanalyzer.go b/typedapi/esdsl/spanishanalyzer.go index f46a8ac80c..3300bb3d6e 100644 --- a/typedapi/esdsl/spanishanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_spanishAnalyzer) StemExclusion(stemexclusions ...string) *_spanishAnal return s } -func (s *_spanishAnalyzer) Stopwords(stopwords ...string) *_spanishAnalyzer { +func (s *_spanishAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_spanishAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/spanmultitermquery.go b/typedapi/esdsl/spanmultitermquery.go index 81ed36787a..b63fa09f8f 100644 --- a/typedapi/esdsl/spanmultitermquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -26,7 +26,8 @@ type _spanMultiTermQuery struct { v *types.SpanMultiTermQuery } -// Wraps a `term`, `range`, `prefix`, `wildcard`, `regexp`, or `fuzzy` query. +// Allows you to wrap a multi term query (one of `wildcard`, `fuzzy`, `prefix`, +// `range`, or `regexp` query) as a `span` query, so it can be nested. func NewSpanMultiTermQuery(match types.QueryVariant) *_spanMultiTermQuery { tmp := &_spanMultiTermQuery{v: types.NewSpanMultiTermQuery()} diff --git a/typedapi/esdsl/spannearquery.go b/typedapi/esdsl/spannearquery.go index 2d3bf03e92..e61f4a9542 100644 --- a/typedapi/esdsl/spannearquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/spannotquery.go b/typedapi/esdsl/spannotquery.go index 785d0d1587..9d18c2aaad 100644 --- a/typedapi/esdsl/spannotquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/spanorquery.go b/typedapi/esdsl/spanorquery.go index deef02c194..7fb7fb703a 100644 --- a/typedapi/esdsl/spanorquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/spanquery.go b/typedapi/esdsl/spanquery.go index e02b3af5d8..095a51c8f6 100644 --- a/typedapi/esdsl/spanquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/spantermquery.go b/typedapi/esdsl/spantermquery.go index 0b0ecb7b48..83c6c7f857 100644 --- a/typedapi/esdsl/spantermquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/spanwithinquery.go b/typedapi/esdsl/spanwithinquery.go index dd4442316f..40ff77523d 100644 --- a/typedapi/esdsl/spanwithinquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sparsevectorindexoptions.go b/typedapi/esdsl/sparsevectorindexoptions.go new file mode 100644 index 0000000000..f10df8a207 --- /dev/null +++ b/typedapi/esdsl/sparsevectorindexoptions.go @@ -0,0 +1,51 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _sparseVectorIndexOptions struct { + v *types.SparseVectorIndexOptions +} + +func NewSparseVectorIndexOptions() *_sparseVectorIndexOptions { + + return &_sparseVectorIndexOptions{v: types.NewSparseVectorIndexOptions()} + +} + +func (s *_sparseVectorIndexOptions) Prune(prune bool) *_sparseVectorIndexOptions { + + s.v.Prune = &prune + + return s +} + +func (s *_sparseVectorIndexOptions) PruningConfig(pruningconfig types.TokenPruningConfigVariant) *_sparseVectorIndexOptions { + + s.v.PruningConfig = pruningconfig.TokenPruningConfigCaster() + + return s +} + +func (s *_sparseVectorIndexOptions) SparseVectorIndexOptionsCaster() *types.SparseVectorIndexOptions { + return s.v +} diff --git a/typedapi/esdsl/sparsevectorproperty.go b/typedapi/esdsl/sparsevectorproperty.go index 11b6700387..9d879c731c 100644 --- a/typedapi/esdsl/sparsevectorproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -70,6 +70,13 @@ func (s *_sparseVectorProperty) IgnoreAbove(ignoreabove int) *_sparseVectorPrope return s } +func (s *_sparseVectorProperty) IndexOptions(indexoptions types.SparseVectorIndexOptionsVariant) *_sparseVectorProperty { + + s.v.IndexOptions = indexoptions.SparseVectorIndexOptionsCaster() + + return s +} + func (s *_sparseVectorProperty) Meta(meta map[string]string) *_sparseVectorProperty { s.v.Meta = meta @@ -112,6 +119,13 @@ func (s *_sparseVectorProperty) AddProperty(key string, value types.PropertyVari return s } +func (s *_sparseVectorProperty) Store(store bool) *_sparseVectorProperty { + + s.v.Store = &store + + return s +} + func (s *_sparseVectorProperty) SyntheticSourceKeep(syntheticsourcekeep syntheticsourcekeepenum.SyntheticSourceKeepEnum) *_sparseVectorProperty { s.v.SyntheticSourceKeep = &syntheticsourcekeep diff --git a/typedapi/esdsl/sparsevectorquery.go b/typedapi/esdsl/sparsevectorquery.go index 9568fd29f7..8a97abf360 100644 --- a/typedapi/esdsl/sparsevectorquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/specifieddocument.go b/typedapi/esdsl/specifieddocument.go new file mode 100644 index 0000000000..315d281e9c --- /dev/null +++ b/typedapi/esdsl/specifieddocument.go @@ -0,0 +1,51 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package esdsl + +import "github.com/elastic/go-elasticsearch/v9/typedapi/types" + +type _specifiedDocument struct { + v *types.SpecifiedDocument +} + +func NewSpecifiedDocument() *_specifiedDocument { + + return &_specifiedDocument{v: types.NewSpecifiedDocument()} + +} + +func (s *_specifiedDocument) Id(id string) *_specifiedDocument { + + s.v.Id = id + + return s +} + +func (s *_specifiedDocument) Index(indexname string) *_specifiedDocument { + + s.v.Index = &indexname + + return s +} + +func (s *_specifiedDocument) SpecifiedDocumentCaster() *types.SpecifiedDocument { + return s.v +} diff --git a/typedapi/esdsl/splitprocessor.go b/typedapi/esdsl/splitprocessor.go index 9ad524074d..923aac2fc1 100644 --- a/typedapi/esdsl/splitprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/standardanalyzer.go b/typedapi/esdsl/standardanalyzer.go index 2932b4e3e1..f2fe2aae0d 100644 --- a/typedapi/esdsl/standardanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -39,9 +39,9 @@ func (s *_standardAnalyzer) MaxTokenLength(maxtokenlength int) *_standardAnalyze return s } -func (s *_standardAnalyzer) Stopwords(stopwords ...string) *_standardAnalyzer { +func (s *_standardAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_standardAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/standardretriever.go b/typedapi/esdsl/standardretriever.go index f9ba7d5939..038e2f06f2 100644 --- a/typedapi/esdsl/standardretriever.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -57,6 +57,13 @@ func (s *_standardRetriever) MinScore(minscore float32) *_standardRetriever { return s } +func (s *_standardRetriever) Name_(name_ string) *_standardRetriever { + + s.v.Name_ = &name_ + + return s +} + func (s *_standardRetriever) Query(query types.QueryVariant) *_standardRetriever { s.v.Query = query.QueryCaster() diff --git a/typedapi/esdsl/standardtokenizer.go b/typedapi/esdsl/standardtokenizer.go index f718dc4cc2..30de99da4b 100644 --- a/typedapi/esdsl/standardtokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/statsaggregation.go b/typedapi/esdsl/statsaggregation.go index dd164ed375..092d557b22 100644 --- a/typedapi/esdsl/statsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/statsbucketaggregation.go b/typedapi/esdsl/statsbucketaggregation.go index 60a04adcd2..201402e748 100644 --- a/typedapi/esdsl/statsbucketaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/stemmeroverridetokenfilter.go b/typedapi/esdsl/stemmeroverridetokenfilter.go index 12dbd1354d..dcad00262d 100644 --- a/typedapi/esdsl/stemmeroverridetokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/stemmertokenfilter.go b/typedapi/esdsl/stemmertokenfilter.go index 24ec9a342f..7e4f2f1d96 100644 --- a/typedapi/esdsl/stemmertokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/stepkey.go b/typedapi/esdsl/stepkey.go index fb4fd9ebf5..d501acbdac 100644 --- a/typedapi/esdsl/stepkey.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/stopanalyzer.go b/typedapi/esdsl/stopanalyzer.go index d0ff30e3f9..9ee27cb61b 100644 --- a/typedapi/esdsl/stopanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -32,9 +32,9 @@ func NewStopAnalyzer() *_stopAnalyzer { } -func (s *_stopAnalyzer) Stopwords(stopwords ...string) *_stopAnalyzer { +func (s *_stopAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_stopAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/stoptokenfilter.go b/typedapi/esdsl/stoptokenfilter.go index e154cc1e18..d798e00a0c 100644 --- a/typedapi/esdsl/stoptokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -46,9 +46,9 @@ func (s *_stopTokenFilter) RemoveTrailing(removetrailing bool) *_stopTokenFilter return s } -func (s *_stopTokenFilter) Stopwords(stopwords ...string) *_stopTokenFilter { +func (s *_stopTokenFilter) Stopwords(stopwords types.StopWordsVariant) *_stopTokenFilter { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/stopwords.go b/typedapi/esdsl/stopwords.go index 15d2c0ae01..7f7430e4f8 100644 --- a/typedapi/esdsl/stopwords.go +++ b/typedapi/esdsl/stopwords.go @@ -16,11 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl -import "github.com/elastic/go-elasticsearch/v9/typedapi/types" +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/stopwordlanguage" +) // This is provide all the types that are part of the union. type _stopWords struct { @@ -31,6 +34,12 @@ func NewStopWords() *_stopWords { return &_stopWords{v: nil} } +func (u *_stopWords) StopWordLanguage(stopwordlanguage stopwordlanguage.StopWordLanguage) *_stopWords { + + u.v = &stopwordlanguage + return u +} + func (u *_stopWords) Strings(strings ...string) *_stopWords { u.v = make([]string, len(strings)) diff --git a/typedapi/esdsl/storage.go b/typedapi/esdsl/storage.go index 0146babb91..bdebcd36ab 100644 --- a/typedapi/esdsl/storage.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -46,6 +46,13 @@ func (s *_storage) AllowMmap(allowmmap bool) *_storage { return s } +func (s *_storage) StatsRefreshInterval(duration types.DurationVariant) *_storage { + + s.v.StatsRefreshInterval = *duration.DurationCaster() + + return s +} + func (s *_storage) Type(type_ storagetype.StorageType) *_storage { s.v.Type = type_ diff --git a/typedapi/esdsl/storedscript.go b/typedapi/esdsl/storedscript.go index cad16d82e1..e6b7e3908d 100644 --- a/typedapi/esdsl/storedscript.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/stringifiedboolean.go b/typedapi/esdsl/stringifiedboolean.go index 5db5751705..49b33a4ccf 100644 --- a/typedapi/esdsl/stringifiedboolean.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/stringifiedepochtimeunitmillis.go b/typedapi/esdsl/stringifiedepochtimeunitmillis.go index f202ebe096..dc5250dc7b 100644 --- a/typedapi/esdsl/stringifiedepochtimeunitmillis.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/stringifiedinteger.go b/typedapi/esdsl/stringifiedinteger.go index 0c275aa35d..0e27583757 100644 --- a/typedapi/esdsl/stringifiedinteger.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/stringstatsaggregation.go b/typedapi/esdsl/stringstatsaggregation.go index a4640a0f77..f686580662 100644 --- a/typedapi/esdsl/stringstatsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/stupidbackoffsmoothingmodel.go b/typedapi/esdsl/stupidbackoffsmoothingmodel.go index 0ece709adc..ada6450a69 100644 --- a/typedapi/esdsl/stupidbackoffsmoothingmodel.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/suggestcontext.go b/typedapi/esdsl/suggestcontext.go index 3107fc13a8..75e26bbea1 100644 --- a/typedapi/esdsl/suggestcontext.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -52,7 +52,7 @@ func (s *_suggestContext) Path(field string) *_suggestContext { func (s *_suggestContext) Precision(precision string) *_suggestContext { - s.v.Precision = precision + s.v.Precision = &precision return s } diff --git a/typedapi/esdsl/suggester.go b/typedapi/esdsl/suggester.go index 69c125c21d..58cfae740b 100644 --- a/typedapi/esdsl/suggester.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/suggestfuzziness.go b/typedapi/esdsl/suggestfuzziness.go index 7d437cd050..5c5e4fbe5f 100644 --- a/typedapi/esdsl/suggestfuzziness.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sumaggregation.go b/typedapi/esdsl/sumaggregation.go index ee2db62e31..bdd1456e19 100644 --- a/typedapi/esdsl/sumaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/sumbucketaggregation.go b/typedapi/esdsl/sumbucketaggregation.go index a2ef0d25ae..8b3e9ffe04 100644 --- a/typedapi/esdsl/sumbucketaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/swedishanalyzer.go b/typedapi/esdsl/swedishanalyzer.go index 21130e6f66..ab9987379a 100644 --- a/typedapi/esdsl/swedishanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_swedishAnalyzer) StemExclusion(stemexclusions ...string) *_swedishAnal return s } -func (s *_swedishAnalyzer) Stopwords(stopwords ...string) *_swedishAnalyzer { +func (s *_swedishAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_swedishAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/synccontainer.go b/typedapi/esdsl/synccontainer.go index edd54a540a..e17ff3245b 100644 --- a/typedapi/esdsl/synccontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/syncrulesfeature.go b/typedapi/esdsl/syncrulesfeature.go index 8d76825fcd..01a9ec384a 100644 --- a/typedapi/esdsl/syncrulesfeature.go +++ b/typedapi/esdsl/syncrulesfeature.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/synonymgraphtokenfilter.go b/typedapi/esdsl/synonymgraphtokenfilter.go index 03bd02dec6..fbc710c364 100644 --- a/typedapi/esdsl/synonymgraphtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/synonymrule.go b/typedapi/esdsl/synonymrule.go index 7ed146802f..213c1a16fc 100644 --- a/typedapi/esdsl/synonymrule.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/synonymtokenfilter.go b/typedapi/esdsl/synonymtokenfilter.go index abfeddd149..f94332296e 100644 --- a/typedapi/esdsl/synonymtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/tablevaluescontainer.go b/typedapi/esdsl/tablevaluescontainer.go index 2484286a25..fb80cafcfe 100644 --- a/typedapi/esdsl/tablevaluescontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/tablevaluesintegervalue.go b/typedapi/esdsl/tablevaluesintegervalue.go index c3b6a42268..da26ea175b 100644 --- a/typedapi/esdsl/tablevaluesintegervalue.go +++ b/typedapi/esdsl/tablevaluesintegervalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/tablevalueskeywordvalue.go b/typedapi/esdsl/tablevalueskeywordvalue.go index 2a51119418..5e76502e6f 100644 --- a/typedapi/esdsl/tablevalueskeywordvalue.go +++ b/typedapi/esdsl/tablevalueskeywordvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/tablevalueslongdouble.go b/typedapi/esdsl/tablevalueslongdouble.go index 237c089cfa..8d4d50caed 100644 --- a/typedapi/esdsl/tablevalueslongdouble.go +++ b/typedapi/esdsl/tablevalueslongdouble.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/tablevalueslongvalue.go b/typedapi/esdsl/tablevalueslongvalue.go index e38e1b7636..ff338d7303 100644 --- a/typedapi/esdsl/tablevalueslongvalue.go +++ b/typedapi/esdsl/tablevalueslongvalue.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/targetmeanencodingpreprocessor.go b/typedapi/esdsl/targetmeanencodingpreprocessor.go index c641f1c494..0828875622 100644 --- a/typedapi/esdsl/targetmeanencodingpreprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/tdigest.go b/typedapi/esdsl/tdigest.go index e8b94507f2..a0ccaba0d0 100644 --- a/typedapi/esdsl/tdigest.go +++ b/typedapi/esdsl/tdigest.go @@ -16,11 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl -import "github.com/elastic/go-elasticsearch/v9/typedapi/types" +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tdigestexecutionhint" +) type _tDigest struct { v *types.TDigest @@ -39,6 +42,12 @@ func (s *_tDigest) Compression(compression int) *_tDigest { return s } +func (s *_tDigest) ExecutionHint(executionhint tdigestexecutionhint.TDigestExecutionHint) *_tDigest { + + s.v.ExecutionHint = &executionhint + return s +} + func (s *_tDigest) TDigestCaster() *types.TDigest { return s.v } diff --git a/typedapi/esdsl/templateconfig.go b/typedapi/esdsl/templateconfig.go index 87999487a1..799cfe52fa 100644 --- a/typedapi/esdsl/templateconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/terminateprocessor.go b/typedapi/esdsl/terminateprocessor.go index 40e42614ba..e59ebdf53f 100644 --- a/typedapi/esdsl/terminateprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/termquery.go b/typedapi/esdsl/termquery.go index 39a1ee8426..f107107871 100644 --- a/typedapi/esdsl/termquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -27,7 +27,7 @@ type _termQuery struct { v *types.TermQuery } -// Returns documents that contain an exact term in a provided field. +// Returns users that contain an exact term in a provided field. // To return a document, the query term must exactly match the queried field's // value, including whitespace and capitalization. func NewTermQuery(field string, value types.FieldValueVariant) *_termQuery { diff --git a/typedapi/esdsl/termrangequery.go b/typedapi/esdsl/termrangequery.go index 99b97c935e..4177c898b0 100644 --- a/typedapi/esdsl/termrangequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -45,13 +45,6 @@ func (s *_termRangeQuery) Boost(boost float32) *_termRangeQuery { return s } -func (s *_termRangeQuery) From(from string) *_termRangeQuery { - - s.v.From = &from - - return s -} - func (s *_termRangeQuery) Gt(gt string) *_termRangeQuery { s.v.Gt = > @@ -93,13 +86,6 @@ func (s *_termRangeQuery) Relation(relation rangerelation.RangeRelation) *_termR return s } -func (s *_termRangeQuery) To(to string) *_termRangeQuery { - - s.v.To = &to - - return s -} - func (s *_termRangeQuery) QueryCaster() *types.Query { container := types.NewQuery() container.Range = map[string]types.RangeQuery{ diff --git a/typedapi/esdsl/termsaggregation.go b/typedapi/esdsl/termsaggregation.go index e4db1e9e74..15175e2e65 100644 --- a/typedapi/esdsl/termsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/termsexclude.go b/typedapi/esdsl/termsexclude.go index 9c79fb34d9..702d9e205f 100644 --- a/typedapi/esdsl/termsexclude.go +++ b/typedapi/esdsl/termsexclude.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/termsgrouping.go b/typedapi/esdsl/termsgrouping.go index 0f192deb31..102573a79c 100644 --- a/typedapi/esdsl/termsgrouping.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/termsinclude.go b/typedapi/esdsl/termsinclude.go index 4a17a07317..f10e6fcc94 100644 --- a/typedapi/esdsl/termsinclude.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -48,7 +48,7 @@ func (u *_termsInclude) Strings(strings ...string) *_termsInclude { func (u *_termsInclude) TermsPartition(termspartition types.TermsPartitionVariant) *_termsInclude { - u.v = &termspartition + u.v = termspartition.TermsPartitionCaster() return u } diff --git a/typedapi/esdsl/termslookup.go b/typedapi/esdsl/termslookup.go index 150fe12fde..ea5b6c244b 100644 --- a/typedapi/esdsl/termslookup.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/termspartition.go b/typedapi/esdsl/termspartition.go index 77680a5807..4028787a45 100644 --- a/typedapi/esdsl/termspartition.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/termsquery.go b/typedapi/esdsl/termsquery.go index 9b63e037fa..76ff5e3841 100644 --- a/typedapi/esdsl/termsquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/termsqueryfield.go b/typedapi/esdsl/termsqueryfield.go index 51690608d7..bd02d2bfdd 100644 --- a/typedapi/esdsl/termsqueryfield.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -43,7 +43,7 @@ func (u *_termsQueryField) FieldValues(fieldvalues ...types.FieldValueVariant) * func (u *_termsQueryField) TermsLookup(termslookup types.TermsLookupVariant) *_termsQueryField { - u.v = &termslookup + u.v = termslookup.TermsLookupCaster() return u } diff --git a/typedapi/esdsl/termssetquery.go b/typedapi/esdsl/termssetquery.go index 0f0555e16f..ee047dcf2d 100644 --- a/typedapi/esdsl/termssetquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/termsuggester.go b/typedapi/esdsl/termsuggester.go index d70c150737..b39918f928 100644 --- a/typedapi/esdsl/termsuggester.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/termvectorsfilter.go b/typedapi/esdsl/termvectorsfilter.go index a78332a7c1..bc302262db 100644 --- a/typedapi/esdsl/termvectorsfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/testpopulation.go b/typedapi/esdsl/testpopulation.go index 206c836b68..064a0a2af6 100644 --- a/typedapi/esdsl/testpopulation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/textclassificationinferenceoptions.go b/typedapi/esdsl/textclassificationinferenceoptions.go index 46f3047953..9586499fcf 100644 --- a/typedapi/esdsl/textclassificationinferenceoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/textclassificationinferenceupdateoptions.go b/typedapi/esdsl/textclassificationinferenceupdateoptions.go index 6001c32708..71aa3e559f 100644 --- a/typedapi/esdsl/textclassificationinferenceupdateoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/textembedding.go b/typedapi/esdsl/textembedding.go index 410f8a9df4..421118ff83 100644 --- a/typedapi/esdsl/textembedding.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/textembeddinginferenceoptions.go b/typedapi/esdsl/textembeddinginferenceoptions.go index 25b79a8d46..d8fa482818 100644 --- a/typedapi/esdsl/textembeddinginferenceoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/textembeddinginferenceupdateoptions.go b/typedapi/esdsl/textembeddinginferenceupdateoptions.go index b871966cd0..765fcd4fd8 100644 --- a/typedapi/esdsl/textembeddinginferenceupdateoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/textexpansioninferenceoptions.go b/typedapi/esdsl/textexpansioninferenceoptions.go index 86c12c7b5a..72c0449253 100644 --- a/typedapi/esdsl/textexpansioninferenceoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/textexpansioninferenceupdateoptions.go b/typedapi/esdsl/textexpansioninferenceupdateoptions.go index 81c7dbaf4f..37db285651 100644 --- a/typedapi/esdsl/textexpansioninferenceupdateoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/textexpansionquery.go b/typedapi/esdsl/textexpansionquery.go index 5bb5bbba96..4e850af970 100644 --- a/typedapi/esdsl/textexpansionquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/textindexprefixes.go b/typedapi/esdsl/textindexprefixes.go index 105b8ab65f..4e777ea445 100644 --- a/typedapi/esdsl/textindexprefixes.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/textproperty.go b/typedapi/esdsl/textproperty.go index 0c86b05fe1..0ca9069ab6 100644 --- a/typedapi/esdsl/textproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/textsimilarityreranker.go b/typedapi/esdsl/textsimilarityreranker.go index 48ec9e2fe2..6beb56290b 100644 --- a/typedapi/esdsl/textsimilarityreranker.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -28,10 +28,14 @@ type _textSimilarityReranker struct { // A retriever that reranks the top documents based on a reranking model using // the InferenceAPI -func NewTextSimilarityReranker(retriever types.RetrieverContainerVariant) *_textSimilarityReranker { +func NewTextSimilarityReranker(field string, inferencetext string, retriever types.RetrieverContainerVariant) *_textSimilarityReranker { tmp := &_textSimilarityReranker{v: types.NewTextSimilarityReranker()} + tmp.Field(field) + + tmp.InferenceText(inferencetext) + tmp.Retriever(retriever) return tmp @@ -40,7 +44,7 @@ func NewTextSimilarityReranker(retriever types.RetrieverContainerVariant) *_text func (s *_textSimilarityReranker) Field(field string) *_textSimilarityReranker { - s.v.Field = &field + s.v.Field = field return s } @@ -64,7 +68,7 @@ func (s *_textSimilarityReranker) InferenceId(inferenceid string) *_textSimilari func (s *_textSimilarityReranker) InferenceText(inferencetext string) *_textSimilarityReranker { - s.v.InferenceText = &inferencetext + s.v.InferenceText = inferencetext return s } @@ -76,6 +80,13 @@ func (s *_textSimilarityReranker) MinScore(minscore float32) *_textSimilarityRer return s } +func (s *_textSimilarityReranker) Name_(name_ string) *_textSimilarityReranker { + + s.v.Name_ = &name_ + + return s +} + func (s *_textSimilarityReranker) RankWindowSize(rankwindowsize int) *_textSimilarityReranker { s.v.RankWindowSize = &rankwindowsize diff --git a/typedapi/esdsl/texttoanalyze.go b/typedapi/esdsl/texttoanalyze.go index 222ef4967a..6c4cf184ab 100644 --- a/typedapi/esdsl/texttoanalyze.go +++ b/typedapi/esdsl/texttoanalyze.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/thaianalyzer.go b/typedapi/esdsl/thaianalyzer.go index f8a5f3fb61..e7b4ac481c 100644 --- a/typedapi/esdsl/thaianalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -32,9 +32,9 @@ func NewThaiAnalyzer() *_thaiAnalyzer { } -func (s *_thaiAnalyzer) Stopwords(stopwords ...string) *_thaiAnalyzer { +func (s *_thaiAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_thaiAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/thaitokenizer.go b/typedapi/esdsl/thaitokenizer.go index 0705233e8d..31680bdcb5 100644 --- a/typedapi/esdsl/thaitokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/throttlestate.go b/typedapi/esdsl/throttlestate.go index 3fad0503c7..c0a0dc1a0a 100644 --- a/typedapi/esdsl/throttlestate.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/timeofmonth.go b/typedapi/esdsl/timeofmonth.go index 9975e1ae99..984db498f6 100644 --- a/typedapi/esdsl/timeofmonth.go +++ b/typedapi/esdsl/timeofmonth.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/timeofweek.go b/typedapi/esdsl/timeofweek.go index bb3be8f0f0..8732711e54 100644 --- a/typedapi/esdsl/timeofweek.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/timeofyear.go b/typedapi/esdsl/timeofyear.go index 65a6272aaa..bbd387b774 100644 --- a/typedapi/esdsl/timeofyear.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/timeseriesaggregation.go b/typedapi/esdsl/timeseriesaggregation.go index b2ee8753cf..f872ad2bb9 100644 --- a/typedapi/esdsl/timeseriesaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/timesync.go b/typedapi/esdsl/timesync.go index 066e740b5e..9300e28585 100644 --- a/typedapi/esdsl/timesync.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/tokencountproperty.go b/typedapi/esdsl/tokencountproperty.go index 2bc68dde57..2052d3ef54 100644 --- a/typedapi/esdsl/tokencountproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/tokenfilter.go b/typedapi/esdsl/tokenfilter.go index 27d4060e6c..9d9fe6da88 100644 --- a/typedapi/esdsl/tokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/tokenfilterdefinition.go b/typedapi/esdsl/tokenfilterdefinition.go index be343be2d1..3219017be6 100644 --- a/typedapi/esdsl/tokenfilterdefinition.go +++ b/typedapi/esdsl/tokenfilterdefinition.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,48 @@ func (u *_tokenFilterDefinition) UnknownTokenFilterDefinition(unknown json.RawMe return u } +func (u *_tokenFilterDefinition) ApostropheTokenFilter(apostrophetokenfilter types.ApostropheTokenFilterVariant) *_tokenFilterDefinition { + + u.v = apostrophetokenfilter.ApostropheTokenFilterCaster() + + return u +} + +// Interface implementation for ApostropheTokenFilter in TokenFilterDefinition union +func (u *_apostropheTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) ArabicStemTokenFilter(arabicstemtokenfilter types.ArabicStemTokenFilterVariant) *_tokenFilterDefinition { + + u.v = arabicstemtokenfilter.ArabicStemTokenFilterCaster() + + return u +} + +// Interface implementation for ArabicStemTokenFilter in TokenFilterDefinition union +func (u *_arabicStemTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) ArabicNormalizationTokenFilter(arabicnormalizationtokenfilter types.ArabicNormalizationTokenFilterVariant) *_tokenFilterDefinition { + + u.v = arabicnormalizationtokenfilter.ArabicNormalizationTokenFilterCaster() + + return u +} + +// Interface implementation for ArabicNormalizationTokenFilter in TokenFilterDefinition union +func (u *_arabicNormalizationTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + func (u *_tokenFilterDefinition) AsciiFoldingTokenFilter(asciifoldingtokenfilter types.AsciiFoldingTokenFilterVariant) *_tokenFilterDefinition { - u.v = &asciifoldingtokenfilter + u.v = asciifoldingtokenfilter.AsciiFoldingTokenFilterCaster() return u } @@ -55,9 +94,74 @@ func (u *_asciiFoldingTokenFilter) TokenFilterDefinitionCaster() *types.TokenFil return &t } +func (u *_tokenFilterDefinition) BengaliNormalizationTokenFilter(bengalinormalizationtokenfilter types.BengaliNormalizationTokenFilterVariant) *_tokenFilterDefinition { + + u.v = bengalinormalizationtokenfilter.BengaliNormalizationTokenFilterCaster() + + return u +} + +// Interface implementation for BengaliNormalizationTokenFilter in TokenFilterDefinition union +func (u *_bengaliNormalizationTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) BrazilianStemTokenFilter(brazilianstemtokenfilter types.BrazilianStemTokenFilterVariant) *_tokenFilterDefinition { + + u.v = brazilianstemtokenfilter.BrazilianStemTokenFilterCaster() + + return u +} + +// Interface implementation for BrazilianStemTokenFilter in TokenFilterDefinition union +func (u *_brazilianStemTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) CjkBigramTokenFilter(cjkbigramtokenfilter types.CjkBigramTokenFilterVariant) *_tokenFilterDefinition { + + u.v = cjkbigramtokenfilter.CjkBigramTokenFilterCaster() + + return u +} + +// Interface implementation for CjkBigramTokenFilter in TokenFilterDefinition union +func (u *_cjkBigramTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) CjkWidthTokenFilter(cjkwidthtokenfilter types.CjkWidthTokenFilterVariant) *_tokenFilterDefinition { + + u.v = cjkwidthtokenfilter.CjkWidthTokenFilterCaster() + + return u +} + +// Interface implementation for CjkWidthTokenFilter in TokenFilterDefinition union +func (u *_cjkWidthTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) ClassicTokenFilter(classictokenfilter types.ClassicTokenFilterVariant) *_tokenFilterDefinition { + + u.v = classictokenfilter.ClassicTokenFilterCaster() + + return u +} + +// Interface implementation for ClassicTokenFilter in TokenFilterDefinition union +func (u *_classicTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + func (u *_tokenFilterDefinition) CommonGramsTokenFilter(commongramstokenfilter types.CommonGramsTokenFilterVariant) *_tokenFilterDefinition { - u.v = &commongramstokenfilter + u.v = commongramstokenfilter.CommonGramsTokenFilterCaster() return u } @@ -70,7 +174,7 @@ func (u *_commonGramsTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilt func (u *_tokenFilterDefinition) ConditionTokenFilter(conditiontokenfilter types.ConditionTokenFilterVariant) *_tokenFilterDefinition { - u.v = &conditiontokenfilter + u.v = conditiontokenfilter.ConditionTokenFilterCaster() return u } @@ -81,9 +185,35 @@ func (u *_conditionTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilter return &t } +func (u *_tokenFilterDefinition) CzechStemTokenFilter(czechstemtokenfilter types.CzechStemTokenFilterVariant) *_tokenFilterDefinition { + + u.v = czechstemtokenfilter.CzechStemTokenFilterCaster() + + return u +} + +// Interface implementation for CzechStemTokenFilter in TokenFilterDefinition union +func (u *_czechStemTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) DecimalDigitTokenFilter(decimaldigittokenfilter types.DecimalDigitTokenFilterVariant) *_tokenFilterDefinition { + + u.v = decimaldigittokenfilter.DecimalDigitTokenFilterCaster() + + return u +} + +// Interface implementation for DecimalDigitTokenFilter in TokenFilterDefinition union +func (u *_decimalDigitTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + func (u *_tokenFilterDefinition) DelimitedPayloadTokenFilter(delimitedpayloadtokenfilter types.DelimitedPayloadTokenFilterVariant) *_tokenFilterDefinition { - u.v = &delimitedpayloadtokenfilter + u.v = delimitedpayloadtokenfilter.DelimitedPayloadTokenFilterCaster() return u } @@ -94,9 +224,22 @@ func (u *_delimitedPayloadTokenFilter) TokenFilterDefinitionCaster() *types.Toke return &t } +func (u *_tokenFilterDefinition) DutchStemTokenFilter(dutchstemtokenfilter types.DutchStemTokenFilterVariant) *_tokenFilterDefinition { + + u.v = dutchstemtokenfilter.DutchStemTokenFilterCaster() + + return u +} + +// Interface implementation for DutchStemTokenFilter in TokenFilterDefinition union +func (u *_dutchStemTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + func (u *_tokenFilterDefinition) EdgeNGramTokenFilter(edgengramtokenfilter types.EdgeNGramTokenFilterVariant) *_tokenFilterDefinition { - u.v = &edgengramtokenfilter + u.v = edgengramtokenfilter.EdgeNGramTokenFilterCaster() return u } @@ -109,7 +252,7 @@ func (u *_edgeNGramTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilter func (u *_tokenFilterDefinition) ElisionTokenFilter(elisiontokenfilter types.ElisionTokenFilterVariant) *_tokenFilterDefinition { - u.v = &elisiontokenfilter + u.v = elisiontokenfilter.ElisionTokenFilterCaster() return u } @@ -122,7 +265,7 @@ func (u *_elisionTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDe func (u *_tokenFilterDefinition) FingerprintTokenFilter(fingerprinttokenfilter types.FingerprintTokenFilterVariant) *_tokenFilterDefinition { - u.v = &fingerprinttokenfilter + u.v = fingerprinttokenfilter.FingerprintTokenFilterCaster() return u } @@ -133,9 +276,74 @@ func (u *_fingerprintTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilt return &t } +func (u *_tokenFilterDefinition) FlattenGraphTokenFilter(flattengraphtokenfilter types.FlattenGraphTokenFilterVariant) *_tokenFilterDefinition { + + u.v = flattengraphtokenfilter.FlattenGraphTokenFilterCaster() + + return u +} + +// Interface implementation for FlattenGraphTokenFilter in TokenFilterDefinition union +func (u *_flattenGraphTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) FrenchStemTokenFilter(frenchstemtokenfilter types.FrenchStemTokenFilterVariant) *_tokenFilterDefinition { + + u.v = frenchstemtokenfilter.FrenchStemTokenFilterCaster() + + return u +} + +// Interface implementation for FrenchStemTokenFilter in TokenFilterDefinition union +func (u *_frenchStemTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) GermanNormalizationTokenFilter(germannormalizationtokenfilter types.GermanNormalizationTokenFilterVariant) *_tokenFilterDefinition { + + u.v = germannormalizationtokenfilter.GermanNormalizationTokenFilterCaster() + + return u +} + +// Interface implementation for GermanNormalizationTokenFilter in TokenFilterDefinition union +func (u *_germanNormalizationTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) GermanStemTokenFilter(germanstemtokenfilter types.GermanStemTokenFilterVariant) *_tokenFilterDefinition { + + u.v = germanstemtokenfilter.GermanStemTokenFilterCaster() + + return u +} + +// Interface implementation for GermanStemTokenFilter in TokenFilterDefinition union +func (u *_germanStemTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) HindiNormalizationTokenFilter(hindinormalizationtokenfilter types.HindiNormalizationTokenFilterVariant) *_tokenFilterDefinition { + + u.v = hindinormalizationtokenfilter.HindiNormalizationTokenFilterCaster() + + return u +} + +// Interface implementation for HindiNormalizationTokenFilter in TokenFilterDefinition union +func (u *_hindiNormalizationTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + func (u *_tokenFilterDefinition) HunspellTokenFilter(hunspelltokenfilter types.HunspellTokenFilterVariant) *_tokenFilterDefinition { - u.v = &hunspelltokenfilter + u.v = hunspelltokenfilter.HunspellTokenFilterCaster() return u } @@ -148,7 +356,7 @@ func (u *_hunspellTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterD func (u *_tokenFilterDefinition) HyphenationDecompounderTokenFilter(hyphenationdecompoundertokenfilter types.HyphenationDecompounderTokenFilterVariant) *_tokenFilterDefinition { - u.v = &hyphenationdecompoundertokenfilter + u.v = hyphenationdecompoundertokenfilter.HyphenationDecompounderTokenFilterCaster() return u } @@ -159,9 +367,22 @@ func (u *_hyphenationDecompounderTokenFilter) TokenFilterDefinitionCaster() *typ return &t } +func (u *_tokenFilterDefinition) IndicNormalizationTokenFilter(indicnormalizationtokenfilter types.IndicNormalizationTokenFilterVariant) *_tokenFilterDefinition { + + u.v = indicnormalizationtokenfilter.IndicNormalizationTokenFilterCaster() + + return u +} + +// Interface implementation for IndicNormalizationTokenFilter in TokenFilterDefinition union +func (u *_indicNormalizationTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + func (u *_tokenFilterDefinition) KeepTypesTokenFilter(keeptypestokenfilter types.KeepTypesTokenFilterVariant) *_tokenFilterDefinition { - u.v = &keeptypestokenfilter + u.v = keeptypestokenfilter.KeepTypesTokenFilterCaster() return u } @@ -174,7 +395,7 @@ func (u *_keepTypesTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilter func (u *_tokenFilterDefinition) KeepWordsTokenFilter(keepwordstokenfilter types.KeepWordsTokenFilterVariant) *_tokenFilterDefinition { - u.v = &keepwordstokenfilter + u.v = keepwordstokenfilter.KeepWordsTokenFilterCaster() return u } @@ -187,7 +408,7 @@ func (u *_keepWordsTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilter func (u *_tokenFilterDefinition) KeywordMarkerTokenFilter(keywordmarkertokenfilter types.KeywordMarkerTokenFilterVariant) *_tokenFilterDefinition { - u.v = &keywordmarkertokenfilter + u.v = keywordmarkertokenfilter.KeywordMarkerTokenFilterCaster() return u } @@ -198,9 +419,22 @@ func (u *_keywordMarkerTokenFilter) TokenFilterDefinitionCaster() *types.TokenFi return &t } +func (u *_tokenFilterDefinition) KeywordRepeatTokenFilter(keywordrepeattokenfilter types.KeywordRepeatTokenFilterVariant) *_tokenFilterDefinition { + + u.v = keywordrepeattokenfilter.KeywordRepeatTokenFilterCaster() + + return u +} + +// Interface implementation for KeywordRepeatTokenFilter in TokenFilterDefinition union +func (u *_keywordRepeatTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + func (u *_tokenFilterDefinition) KStemTokenFilter(kstemtokenfilter types.KStemTokenFilterVariant) *_tokenFilterDefinition { - u.v = &kstemtokenfilter + u.v = kstemtokenfilter.KStemTokenFilterCaster() return u } @@ -213,7 +447,7 @@ func (u *_kStemTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefi func (u *_tokenFilterDefinition) LengthTokenFilter(lengthtokenfilter types.LengthTokenFilterVariant) *_tokenFilterDefinition { - u.v = &lengthtokenfilter + u.v = lengthtokenfilter.LengthTokenFilterCaster() return u } @@ -226,7 +460,7 @@ func (u *_lengthTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDef func (u *_tokenFilterDefinition) LimitTokenCountTokenFilter(limittokencounttokenfilter types.LimitTokenCountTokenFilterVariant) *_tokenFilterDefinition { - u.v = &limittokencounttokenfilter + u.v = limittokencounttokenfilter.LimitTokenCountTokenFilterCaster() return u } @@ -239,7 +473,7 @@ func (u *_limitTokenCountTokenFilter) TokenFilterDefinitionCaster() *types.Token func (u *_tokenFilterDefinition) LowercaseTokenFilter(lowercasetokenfilter types.LowercaseTokenFilterVariant) *_tokenFilterDefinition { - u.v = &lowercasetokenfilter + u.v = lowercasetokenfilter.LowercaseTokenFilterCaster() return u } @@ -250,9 +484,22 @@ func (u *_lowercaseTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilter return &t } +func (u *_tokenFilterDefinition) MinHashTokenFilter(minhashtokenfilter types.MinHashTokenFilterVariant) *_tokenFilterDefinition { + + u.v = minhashtokenfilter.MinHashTokenFilterCaster() + + return u +} + +// Interface implementation for MinHashTokenFilter in TokenFilterDefinition union +func (u *_minHashTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + func (u *_tokenFilterDefinition) MultiplexerTokenFilter(multiplexertokenfilter types.MultiplexerTokenFilterVariant) *_tokenFilterDefinition { - u.v = &multiplexertokenfilter + u.v = multiplexertokenfilter.MultiplexerTokenFilterCaster() return u } @@ -265,7 +512,7 @@ func (u *_multiplexerTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilt func (u *_tokenFilterDefinition) NGramTokenFilter(ngramtokenfilter types.NGramTokenFilterVariant) *_tokenFilterDefinition { - u.v = &ngramtokenfilter + u.v = ngramtokenfilter.NGramTokenFilterCaster() return u } @@ -278,7 +525,7 @@ func (u *_nGramTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefi func (u *_tokenFilterDefinition) NoriPartOfSpeechTokenFilter(noripartofspeechtokenfilter types.NoriPartOfSpeechTokenFilterVariant) *_tokenFilterDefinition { - u.v = &noripartofspeechtokenfilter + u.v = noripartofspeechtokenfilter.NoriPartOfSpeechTokenFilterCaster() return u } @@ -291,7 +538,7 @@ func (u *_noriPartOfSpeechTokenFilter) TokenFilterDefinitionCaster() *types.Toke func (u *_tokenFilterDefinition) PatternCaptureTokenFilter(patterncapturetokenfilter types.PatternCaptureTokenFilterVariant) *_tokenFilterDefinition { - u.v = &patterncapturetokenfilter + u.v = patterncapturetokenfilter.PatternCaptureTokenFilterCaster() return u } @@ -304,7 +551,7 @@ func (u *_patternCaptureTokenFilter) TokenFilterDefinitionCaster() *types.TokenF func (u *_tokenFilterDefinition) PatternReplaceTokenFilter(patternreplacetokenfilter types.PatternReplaceTokenFilterVariant) *_tokenFilterDefinition { - u.v = &patternreplacetokenfilter + u.v = patternreplacetokenfilter.PatternReplaceTokenFilterCaster() return u } @@ -315,9 +562,35 @@ func (u *_patternReplaceTokenFilter) TokenFilterDefinitionCaster() *types.TokenF return &t } +func (u *_tokenFilterDefinition) PersianNormalizationTokenFilter(persiannormalizationtokenfilter types.PersianNormalizationTokenFilterVariant) *_tokenFilterDefinition { + + u.v = persiannormalizationtokenfilter.PersianNormalizationTokenFilterCaster() + + return u +} + +// Interface implementation for PersianNormalizationTokenFilter in TokenFilterDefinition union +func (u *_persianNormalizationTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) PersianStemTokenFilter(persianstemtokenfilter types.PersianStemTokenFilterVariant) *_tokenFilterDefinition { + + u.v = persianstemtokenfilter.PersianStemTokenFilterCaster() + + return u +} + +// Interface implementation for PersianStemTokenFilter in TokenFilterDefinition union +func (u *_persianStemTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + func (u *_tokenFilterDefinition) PorterStemTokenFilter(porterstemtokenfilter types.PorterStemTokenFilterVariant) *_tokenFilterDefinition { - u.v = &porterstemtokenfilter + u.v = porterstemtokenfilter.PorterStemTokenFilterCaster() return u } @@ -330,7 +603,7 @@ func (u *_porterStemTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilte func (u *_tokenFilterDefinition) PredicateTokenFilter(predicatetokenfilter types.PredicateTokenFilterVariant) *_tokenFilterDefinition { - u.v = &predicatetokenfilter + u.v = predicatetokenfilter.PredicateTokenFilterCaster() return u } @@ -343,7 +616,7 @@ func (u *_predicateTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilter func (u *_tokenFilterDefinition) RemoveDuplicatesTokenFilter(removeduplicatestokenfilter types.RemoveDuplicatesTokenFilterVariant) *_tokenFilterDefinition { - u.v = &removeduplicatestokenfilter + u.v = removeduplicatestokenfilter.RemoveDuplicatesTokenFilterCaster() return u } @@ -356,7 +629,7 @@ func (u *_removeDuplicatesTokenFilter) TokenFilterDefinitionCaster() *types.Toke func (u *_tokenFilterDefinition) ReverseTokenFilter(reversetokenfilter types.ReverseTokenFilterVariant) *_tokenFilterDefinition { - u.v = &reversetokenfilter + u.v = reversetokenfilter.ReverseTokenFilterCaster() return u } @@ -367,9 +640,61 @@ func (u *_reverseTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDe return &t } +func (u *_tokenFilterDefinition) RussianStemTokenFilter(russianstemtokenfilter types.RussianStemTokenFilterVariant) *_tokenFilterDefinition { + + u.v = russianstemtokenfilter.RussianStemTokenFilterCaster() + + return u +} + +// Interface implementation for RussianStemTokenFilter in TokenFilterDefinition union +func (u *_russianStemTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) ScandinavianFoldingTokenFilter(scandinavianfoldingtokenfilter types.ScandinavianFoldingTokenFilterVariant) *_tokenFilterDefinition { + + u.v = scandinavianfoldingtokenfilter.ScandinavianFoldingTokenFilterCaster() + + return u +} + +// Interface implementation for ScandinavianFoldingTokenFilter in TokenFilterDefinition union +func (u *_scandinavianFoldingTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) ScandinavianNormalizationTokenFilter(scandinaviannormalizationtokenfilter types.ScandinavianNormalizationTokenFilterVariant) *_tokenFilterDefinition { + + u.v = scandinaviannormalizationtokenfilter.ScandinavianNormalizationTokenFilterCaster() + + return u +} + +// Interface implementation for ScandinavianNormalizationTokenFilter in TokenFilterDefinition union +func (u *_scandinavianNormalizationTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + +func (u *_tokenFilterDefinition) SerbianNormalizationTokenFilter(serbiannormalizationtokenfilter types.SerbianNormalizationTokenFilterVariant) *_tokenFilterDefinition { + + u.v = serbiannormalizationtokenfilter.SerbianNormalizationTokenFilterCaster() + + return u +} + +// Interface implementation for SerbianNormalizationTokenFilter in TokenFilterDefinition union +func (u *_serbianNormalizationTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + func (u *_tokenFilterDefinition) ShingleTokenFilter(shingletokenfilter types.ShingleTokenFilterVariant) *_tokenFilterDefinition { - u.v = &shingletokenfilter + u.v = shingletokenfilter.ShingleTokenFilterCaster() return u } @@ -382,7 +707,7 @@ func (u *_shingleTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDe func (u *_tokenFilterDefinition) SnowballTokenFilter(snowballtokenfilter types.SnowballTokenFilterVariant) *_tokenFilterDefinition { - u.v = &snowballtokenfilter + u.v = snowballtokenfilter.SnowballTokenFilterCaster() return u } @@ -393,9 +718,22 @@ func (u *_snowballTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterD return &t } +func (u *_tokenFilterDefinition) SoraniNormalizationTokenFilter(soraninormalizationtokenfilter types.SoraniNormalizationTokenFilterVariant) *_tokenFilterDefinition { + + u.v = soraninormalizationtokenfilter.SoraniNormalizationTokenFilterCaster() + + return u +} + +// Interface implementation for SoraniNormalizationTokenFilter in TokenFilterDefinition union +func (u *_soraniNormalizationTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + func (u *_tokenFilterDefinition) StemmerOverrideTokenFilter(stemmeroverridetokenfilter types.StemmerOverrideTokenFilterVariant) *_tokenFilterDefinition { - u.v = &stemmeroverridetokenfilter + u.v = stemmeroverridetokenfilter.StemmerOverrideTokenFilterCaster() return u } @@ -408,7 +746,7 @@ func (u *_stemmerOverrideTokenFilter) TokenFilterDefinitionCaster() *types.Token func (u *_tokenFilterDefinition) StemmerTokenFilter(stemmertokenfilter types.StemmerTokenFilterVariant) *_tokenFilterDefinition { - u.v = &stemmertokenfilter + u.v = stemmertokenfilter.StemmerTokenFilterCaster() return u } @@ -421,7 +759,7 @@ func (u *_stemmerTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDe func (u *_tokenFilterDefinition) StopTokenFilter(stoptokenfilter types.StopTokenFilterVariant) *_tokenFilterDefinition { - u.v = &stoptokenfilter + u.v = stoptokenfilter.StopTokenFilterCaster() return u } @@ -434,7 +772,7 @@ func (u *_stopTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefin func (u *_tokenFilterDefinition) SynonymGraphTokenFilter(synonymgraphtokenfilter types.SynonymGraphTokenFilterVariant) *_tokenFilterDefinition { - u.v = &synonymgraphtokenfilter + u.v = synonymgraphtokenfilter.SynonymGraphTokenFilterCaster() return u } @@ -447,7 +785,7 @@ func (u *_synonymGraphTokenFilter) TokenFilterDefinitionCaster() *types.TokenFil func (u *_tokenFilterDefinition) SynonymTokenFilter(synonymtokenfilter types.SynonymTokenFilterVariant) *_tokenFilterDefinition { - u.v = &synonymtokenfilter + u.v = synonymtokenfilter.SynonymTokenFilterCaster() return u } @@ -460,7 +798,7 @@ func (u *_synonymTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDe func (u *_tokenFilterDefinition) TrimTokenFilter(trimtokenfilter types.TrimTokenFilterVariant) *_tokenFilterDefinition { - u.v = &trimtokenfilter + u.v = trimtokenfilter.TrimTokenFilterCaster() return u } @@ -473,7 +811,7 @@ func (u *_trimTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefin func (u *_tokenFilterDefinition) TruncateTokenFilter(truncatetokenfilter types.TruncateTokenFilterVariant) *_tokenFilterDefinition { - u.v = &truncatetokenfilter + u.v = truncatetokenfilter.TruncateTokenFilterCaster() return u } @@ -486,7 +824,7 @@ func (u *_truncateTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterD func (u *_tokenFilterDefinition) UniqueTokenFilter(uniquetokenfilter types.UniqueTokenFilterVariant) *_tokenFilterDefinition { - u.v = &uniquetokenfilter + u.v = uniquetokenfilter.UniqueTokenFilterCaster() return u } @@ -499,7 +837,7 @@ func (u *_uniqueTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDef func (u *_tokenFilterDefinition) UppercaseTokenFilter(uppercasetokenfilter types.UppercaseTokenFilterVariant) *_tokenFilterDefinition { - u.v = &uppercasetokenfilter + u.v = uppercasetokenfilter.UppercaseTokenFilterCaster() return u } @@ -512,7 +850,7 @@ func (u *_uppercaseTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilter func (u *_tokenFilterDefinition) WordDelimiterGraphTokenFilter(worddelimitergraphtokenfilter types.WordDelimiterGraphTokenFilterVariant) *_tokenFilterDefinition { - u.v = &worddelimitergraphtokenfilter + u.v = worddelimitergraphtokenfilter.WordDelimiterGraphTokenFilterCaster() return u } @@ -525,7 +863,7 @@ func (u *_wordDelimiterGraphTokenFilter) TokenFilterDefinitionCaster() *types.To func (u *_tokenFilterDefinition) WordDelimiterTokenFilter(worddelimitertokenfilter types.WordDelimiterTokenFilterVariant) *_tokenFilterDefinition { - u.v = &worddelimitertokenfilter + u.v = worddelimitertokenfilter.WordDelimiterTokenFilterCaster() return u } @@ -536,9 +874,22 @@ func (u *_wordDelimiterTokenFilter) TokenFilterDefinitionCaster() *types.TokenFi return &t } +func (u *_tokenFilterDefinition) JaStopTokenFilter(jastoptokenfilter types.JaStopTokenFilterVariant) *_tokenFilterDefinition { + + u.v = jastoptokenfilter.JaStopTokenFilterCaster() + + return u +} + +// Interface implementation for JaStopTokenFilter in TokenFilterDefinition union +func (u *_jaStopTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterDefinition { + t := types.TokenFilterDefinition(u.v) + return &t +} + func (u *_tokenFilterDefinition) KuromojiStemmerTokenFilter(kuromojistemmertokenfilter types.KuromojiStemmerTokenFilterVariant) *_tokenFilterDefinition { - u.v = &kuromojistemmertokenfilter + u.v = kuromojistemmertokenfilter.KuromojiStemmerTokenFilterCaster() return u } @@ -551,7 +902,7 @@ func (u *_kuromojiStemmerTokenFilter) TokenFilterDefinitionCaster() *types.Token func (u *_tokenFilterDefinition) KuromojiReadingFormTokenFilter(kuromojireadingformtokenfilter types.KuromojiReadingFormTokenFilterVariant) *_tokenFilterDefinition { - u.v = &kuromojireadingformtokenfilter + u.v = kuromojireadingformtokenfilter.KuromojiReadingFormTokenFilterCaster() return u } @@ -564,7 +915,7 @@ func (u *_kuromojiReadingFormTokenFilter) TokenFilterDefinitionCaster() *types.T func (u *_tokenFilterDefinition) KuromojiPartOfSpeechTokenFilter(kuromojipartofspeechtokenfilter types.KuromojiPartOfSpeechTokenFilterVariant) *_tokenFilterDefinition { - u.v = &kuromojipartofspeechtokenfilter + u.v = kuromojipartofspeechtokenfilter.KuromojiPartOfSpeechTokenFilterCaster() return u } @@ -577,7 +928,7 @@ func (u *_kuromojiPartOfSpeechTokenFilter) TokenFilterDefinitionCaster() *types. func (u *_tokenFilterDefinition) IcuCollationTokenFilter(icucollationtokenfilter types.IcuCollationTokenFilterVariant) *_tokenFilterDefinition { - u.v = &icucollationtokenfilter + u.v = icucollationtokenfilter.IcuCollationTokenFilterCaster() return u } @@ -590,7 +941,7 @@ func (u *_icuCollationTokenFilter) TokenFilterDefinitionCaster() *types.TokenFil func (u *_tokenFilterDefinition) IcuFoldingTokenFilter(icufoldingtokenfilter types.IcuFoldingTokenFilterVariant) *_tokenFilterDefinition { - u.v = &icufoldingtokenfilter + u.v = icufoldingtokenfilter.IcuFoldingTokenFilterCaster() return u } @@ -603,7 +954,7 @@ func (u *_icuFoldingTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilte func (u *_tokenFilterDefinition) IcuNormalizationTokenFilter(icunormalizationtokenfilter types.IcuNormalizationTokenFilterVariant) *_tokenFilterDefinition { - u.v = &icunormalizationtokenfilter + u.v = icunormalizationtokenfilter.IcuNormalizationTokenFilterCaster() return u } @@ -616,7 +967,7 @@ func (u *_icuNormalizationTokenFilter) TokenFilterDefinitionCaster() *types.Toke func (u *_tokenFilterDefinition) IcuTransformTokenFilter(icutransformtokenfilter types.IcuTransformTokenFilterVariant) *_tokenFilterDefinition { - u.v = &icutransformtokenfilter + u.v = icutransformtokenfilter.IcuTransformTokenFilterCaster() return u } @@ -629,7 +980,7 @@ func (u *_icuTransformTokenFilter) TokenFilterDefinitionCaster() *types.TokenFil func (u *_tokenFilterDefinition) PhoneticTokenFilter(phonetictokenfilter types.PhoneticTokenFilterVariant) *_tokenFilterDefinition { - u.v = &phonetictokenfilter + u.v = phonetictokenfilter.PhoneticTokenFilterCaster() return u } @@ -642,7 +993,7 @@ func (u *_phoneticTokenFilter) TokenFilterDefinitionCaster() *types.TokenFilterD func (u *_tokenFilterDefinition) DictionaryDecompounderTokenFilter(dictionarydecompoundertokenfilter types.DictionaryDecompounderTokenFilterVariant) *_tokenFilterDefinition { - u.v = &dictionarydecompoundertokenfilter + u.v = dictionarydecompoundertokenfilter.DictionaryDecompounderTokenFilterCaster() return u } diff --git a/typedapi/esdsl/tokenizationconfigcontainer.go b/typedapi/esdsl/tokenizationconfigcontainer.go index dca6964523..1b183e8bea 100644 --- a/typedapi/esdsl/tokenizationconfigcontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/tokenizer.go b/typedapi/esdsl/tokenizer.go index 8888d087d7..3cd391ba04 100644 --- a/typedapi/esdsl/tokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/tokenizerdefinition.go b/typedapi/esdsl/tokenizerdefinition.go index 59b78c74ea..d2520521b6 100644 --- a/typedapi/esdsl/tokenizerdefinition.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -44,7 +44,7 @@ func (u *_tokenizerDefinition) UnknownTokenizerDefinition(unknown json.RawMessag func (u *_tokenizerDefinition) CharGroupTokenizer(chargrouptokenizer types.CharGroupTokenizerVariant) *_tokenizerDefinition { - u.v = &chargrouptokenizer + u.v = chargrouptokenizer.CharGroupTokenizerCaster() return u } @@ -57,7 +57,7 @@ func (u *_charGroupTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefini func (u *_tokenizerDefinition) ClassicTokenizer(classictokenizer types.ClassicTokenizerVariant) *_tokenizerDefinition { - u.v = &classictokenizer + u.v = classictokenizer.ClassicTokenizerCaster() return u } @@ -70,7 +70,7 @@ func (u *_classicTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefiniti func (u *_tokenizerDefinition) EdgeNGramTokenizer(edgengramtokenizer types.EdgeNGramTokenizerVariant) *_tokenizerDefinition { - u.v = &edgengramtokenizer + u.v = edgengramtokenizer.EdgeNGramTokenizerCaster() return u } @@ -83,7 +83,7 @@ func (u *_edgeNGramTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefini func (u *_tokenizerDefinition) KeywordTokenizer(keywordtokenizer types.KeywordTokenizerVariant) *_tokenizerDefinition { - u.v = &keywordtokenizer + u.v = keywordtokenizer.KeywordTokenizerCaster() return u } @@ -96,7 +96,7 @@ func (u *_keywordTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefiniti func (u *_tokenizerDefinition) LetterTokenizer(lettertokenizer types.LetterTokenizerVariant) *_tokenizerDefinition { - u.v = &lettertokenizer + u.v = lettertokenizer.LetterTokenizerCaster() return u } @@ -109,7 +109,7 @@ func (u *_letterTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefinitio func (u *_tokenizerDefinition) LowercaseTokenizer(lowercasetokenizer types.LowercaseTokenizerVariant) *_tokenizerDefinition { - u.v = &lowercasetokenizer + u.v = lowercasetokenizer.LowercaseTokenizerCaster() return u } @@ -122,7 +122,7 @@ func (u *_lowercaseTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefini func (u *_tokenizerDefinition) NGramTokenizer(ngramtokenizer types.NGramTokenizerVariant) *_tokenizerDefinition { - u.v = &ngramtokenizer + u.v = ngramtokenizer.NGramTokenizerCaster() return u } @@ -135,7 +135,7 @@ func (u *_nGramTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefinition func (u *_tokenizerDefinition) PathHierarchyTokenizer(pathhierarchytokenizer types.PathHierarchyTokenizerVariant) *_tokenizerDefinition { - u.v = &pathhierarchytokenizer + u.v = pathhierarchytokenizer.PathHierarchyTokenizerCaster() return u } @@ -148,7 +148,7 @@ func (u *_pathHierarchyTokenizer) TokenizerDefinitionCaster() *types.TokenizerDe func (u *_tokenizerDefinition) PatternTokenizer(patterntokenizer types.PatternTokenizerVariant) *_tokenizerDefinition { - u.v = &patterntokenizer + u.v = patterntokenizer.PatternTokenizerCaster() return u } @@ -161,7 +161,7 @@ func (u *_patternTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefiniti func (u *_tokenizerDefinition) SimplePatternTokenizer(simplepatterntokenizer types.SimplePatternTokenizerVariant) *_tokenizerDefinition { - u.v = &simplepatterntokenizer + u.v = simplepatterntokenizer.SimplePatternTokenizerCaster() return u } @@ -174,7 +174,7 @@ func (u *_simplePatternTokenizer) TokenizerDefinitionCaster() *types.TokenizerDe func (u *_tokenizerDefinition) SimplePatternSplitTokenizer(simplepatternsplittokenizer types.SimplePatternSplitTokenizerVariant) *_tokenizerDefinition { - u.v = &simplepatternsplittokenizer + u.v = simplepatternsplittokenizer.SimplePatternSplitTokenizerCaster() return u } @@ -187,7 +187,7 @@ func (u *_simplePatternSplitTokenizer) TokenizerDefinitionCaster() *types.Tokeni func (u *_tokenizerDefinition) StandardTokenizer(standardtokenizer types.StandardTokenizerVariant) *_tokenizerDefinition { - u.v = &standardtokenizer + u.v = standardtokenizer.StandardTokenizerCaster() return u } @@ -200,7 +200,7 @@ func (u *_standardTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefinit func (u *_tokenizerDefinition) ThaiTokenizer(thaitokenizer types.ThaiTokenizerVariant) *_tokenizerDefinition { - u.v = &thaitokenizer + u.v = thaitokenizer.ThaiTokenizerCaster() return u } @@ -213,7 +213,7 @@ func (u *_thaiTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefinition func (u *_tokenizerDefinition) UaxEmailUrlTokenizer(uaxemailurltokenizer types.UaxEmailUrlTokenizerVariant) *_tokenizerDefinition { - u.v = &uaxemailurltokenizer + u.v = uaxemailurltokenizer.UaxEmailUrlTokenizerCaster() return u } @@ -226,7 +226,7 @@ func (u *_uaxEmailUrlTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefi func (u *_tokenizerDefinition) WhitespaceTokenizer(whitespacetokenizer types.WhitespaceTokenizerVariant) *_tokenizerDefinition { - u.v = &whitespacetokenizer + u.v = whitespacetokenizer.WhitespaceTokenizerCaster() return u } @@ -239,7 +239,7 @@ func (u *_whitespaceTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefin func (u *_tokenizerDefinition) IcuTokenizer(icutokenizer types.IcuTokenizerVariant) *_tokenizerDefinition { - u.v = &icutokenizer + u.v = icutokenizer.IcuTokenizerCaster() return u } @@ -252,7 +252,7 @@ func (u *_icuTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefinition { func (u *_tokenizerDefinition) KuromojiTokenizer(kuromojitokenizer types.KuromojiTokenizerVariant) *_tokenizerDefinition { - u.v = &kuromojitokenizer + u.v = kuromojitokenizer.KuromojiTokenizerCaster() return u } @@ -265,7 +265,7 @@ func (u *_kuromojiTokenizer) TokenizerDefinitionCaster() *types.TokenizerDefinit func (u *_tokenizerDefinition) NoriTokenizer(noritokenizer types.NoriTokenizerVariant) *_tokenizerDefinition { - u.v = &noritokenizer + u.v = noritokenizer.NoriTokenizerCaster() return u } diff --git a/typedapi/esdsl/tokenpruningconfig.go b/typedapi/esdsl/tokenpruningconfig.go index 077613174f..bf59526c0b 100644 --- a/typedapi/esdsl/tokenpruningconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/toolcall.go b/typedapi/esdsl/toolcall.go index 1f03fb9cd8..1e641ef7fc 100644 --- a/typedapi/esdsl/toolcall.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/toolcallfunction.go b/typedapi/esdsl/toolcallfunction.go index b488654841..65c1468286 100644 --- a/typedapi/esdsl/toolcallfunction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/tophitsaggregation.go b/typedapi/esdsl/tophitsaggregation.go index 1509bff51f..92a6fb09dc 100644 --- a/typedapi/esdsl/tophitsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/topleftbottomrightgeobounds.go b/typedapi/esdsl/topleftbottomrightgeobounds.go index 16fbc9ad15..3761ad59e8 100644 --- a/typedapi/esdsl/topleftbottomrightgeobounds.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/topmetricsaggregation.go b/typedapi/esdsl/topmetricsaggregation.go index 9d2d6fc26c..d3386382a6 100644 --- a/typedapi/esdsl/topmetricsaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/topmetricsvalue.go b/typedapi/esdsl/topmetricsvalue.go index 2bbc1ab4f8..48d47a2f36 100644 --- a/typedapi/esdsl/topmetricsvalue.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/toprightbottomleftgeobounds.go b/typedapi/esdsl/toprightbottomleftgeobounds.go index 72ff2d9698..085a5cac1c 100644 --- a/typedapi/esdsl/toprightbottomleftgeobounds.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/trackhits.go b/typedapi/esdsl/trackhits.go index 6ab28a7784..797fc6c7ba 100644 --- a/typedapi/esdsl/trackhits.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/trainedmodel.go b/typedapi/esdsl/trainedmodel.go index dafc5e150e..60641cd60d 100644 --- a/typedapi/esdsl/trainedmodel.go +++ b/typedapi/esdsl/trainedmodel.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/trainedmodelprefixstrings.go b/typedapi/esdsl/trainedmodelprefixstrings.go index 4f98d9ad76..aa0b5e1b3a 100644 --- a/typedapi/esdsl/trainedmodelprefixstrings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/trainedmodeltree.go b/typedapi/esdsl/trainedmodeltree.go index 8783403ab2..c03e8fc0c8 100644 --- a/typedapi/esdsl/trainedmodeltree.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/trainedmodeltreenode.go b/typedapi/esdsl/trainedmodeltreenode.go index 1e97572100..fc660c1d76 100644 --- a/typedapi/esdsl/trainedmodeltreenode.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/transformcontainer.go b/typedapi/esdsl/transformcontainer.go index 1f1fefea0e..6851417bab 100644 --- a/typedapi/esdsl/transformcontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/transformdestination.go b/typedapi/esdsl/transformdestination.go index 7539195fe0..b31a076a2b 100644 --- a/typedapi/esdsl/transformdestination.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/transformsource.go b/typedapi/esdsl/transformsource.go index 3d12a2a6aa..fbc3ad8712 100644 --- a/typedapi/esdsl/transformsource.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/translog.go b/typedapi/esdsl/translog.go index 780a223a22..7a4dac627a 100644 --- a/typedapi/esdsl/translog.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/translogretention.go b/typedapi/esdsl/translogretention.go index a4c5a13477..4fd56d8b3f 100644 --- a/typedapi/esdsl/translogretention.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/triggercontainer.go b/typedapi/esdsl/triggercontainer.go index bee432cd40..e79acf921a 100644 --- a/typedapi/esdsl/triggercontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/trimprocessor.go b/typedapi/esdsl/trimprocessor.go index c1345c5759..e6dda3ff00 100644 --- a/typedapi/esdsl/trimprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/trimtokenfilter.go b/typedapi/esdsl/trimtokenfilter.go index 91814d546f..4ed7b499c5 100644 --- a/typedapi/esdsl/trimtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/truncatetokenfilter.go b/typedapi/esdsl/truncatetokenfilter.go index dcd876d92b..4e7f3bd061 100644 --- a/typedapi/esdsl/truncatetokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/ttestaggregation.go b/typedapi/esdsl/ttestaggregation.go index d688aa69ac..bb6e6d71cc 100644 --- a/typedapi/esdsl/ttestaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/turkishanalyzer.go b/typedapi/esdsl/turkishanalyzer.go index db2b24b11c..8cab63e846 100644 --- a/typedapi/esdsl/turkishanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -42,9 +42,9 @@ func (s *_turkishAnalyzer) StemExclusion(stemexclusions ...string) *_turkishAnal return s } -func (s *_turkishAnalyzer) Stopwords(stopwords ...string) *_turkishAnalyzer { +func (s *_turkishAnalyzer) Stopwords(stopwords types.StopWordsVariant) *_turkishAnalyzer { - s.v.Stopwords = stopwords + s.v.Stopwords = *stopwords.StopWordsCaster() return s } diff --git a/typedapi/esdsl/typemapping.go b/typedapi/esdsl/typemapping.go index 0b4ac6b234..9828f660fd 100644 --- a/typedapi/esdsl/typemapping.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/typequery.go b/typedapi/esdsl/typequery.go index 09f5928521..f58b48431f 100644 --- a/typedapi/esdsl/typequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/uaxemailurltokenizer.go b/typedapi/esdsl/uaxemailurltokenizer.go index 9426b7551d..c328255248 100644 --- a/typedapi/esdsl/uaxemailurltokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/uniquetokenfilter.go b/typedapi/esdsl/uniquetokenfilter.go index 10478ce363..8fefca822c 100644 --- a/typedapi/esdsl/uniquetokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/unsignedlongnumberproperty.go b/typedapi/esdsl/unsignedlongnumberproperty.go index 8f3b6ce587..316df22781 100644 --- a/typedapi/esdsl/unsignedlongnumberproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/untypeddecayfunction.go b/typedapi/esdsl/untypeddecayfunction.go index 2e14add100..655d4059a7 100644 --- a/typedapi/esdsl/untypeddecayfunction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/untypeddistancefeaturequery.go b/typedapi/esdsl/untypeddistancefeaturequery.go index 11b1f8a1c7..01978efafa 100644 --- a/typedapi/esdsl/untypeddistancefeaturequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/untypedrangequery.go b/typedapi/esdsl/untypedrangequery.go index bf2bdaf5b2..c19d3ceffa 100644 --- a/typedapi/esdsl/untypedrangequery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -54,13 +54,6 @@ func (s *_untypedRangeQuery) Format(dateformat string) *_untypedRangeQuery { return s } -func (s *_untypedRangeQuery) From(from json.RawMessage) *_untypedRangeQuery { - - s.v.From = &from - - return s -} - func (s *_untypedRangeQuery) Gt(gt json.RawMessage) *_untypedRangeQuery { s.v.Gt = gt @@ -109,13 +102,6 @@ func (s *_untypedRangeQuery) TimeZone(timezone string) *_untypedRangeQuery { return s } -func (s *_untypedRangeQuery) To(to json.RawMessage) *_untypedRangeQuery { - - s.v.To = &to - - return s -} - func (s *_untypedRangeQuery) QueryCaster() *types.Query { container := types.NewQuery() container.Range = map[string]types.RangeQuery{ diff --git a/typedapi/esdsl/updateaction.go b/typedapi/esdsl/updateaction.go index f9a8e4bdf1..fcd599032b 100644 --- a/typedapi/esdsl/updateaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/updateoperation.go b/typedapi/esdsl/updateoperation.go index 6236d585f4..706966945e 100644 --- a/typedapi/esdsl/updateoperation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/uppercaseprocessor.go b/typedapi/esdsl/uppercaseprocessor.go index 4de7b00294..f29e9e4798 100644 --- a/typedapi/esdsl/uppercaseprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/uppercasetokenfilter.go b/typedapi/esdsl/uppercasetokenfilter.go index 3ec5ca2d0a..92a4e1edf2 100644 --- a/typedapi/esdsl/uppercasetokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/uripartsprocessor.go b/typedapi/esdsl/uripartsprocessor.go index 6ba1f2cb79..feb9d5c1ac 100644 --- a/typedapi/esdsl/uripartsprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/urldecodeprocessor.go b/typedapi/esdsl/urldecodeprocessor.go index 17d5686949..6f16182f65 100644 --- a/typedapi/esdsl/urldecodeprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/useragentprocessor.go b/typedapi/esdsl/useragentprocessor.go index 2492f1daa2..261641ec66 100644 --- a/typedapi/esdsl/useragentprocessor.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/userquerycontainer.go b/typedapi/esdsl/userquerycontainer.go index 3004f6e80b..6225e7b5f3 100644 --- a/typedapi/esdsl/userquerycontainer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/validation.go b/typedapi/esdsl/validation.go index 6779cc179d..410cf2b96e 100644 --- a/typedapi/esdsl/validation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -33,7 +33,7 @@ func NewValidation() *_validation { func (u *_validation) LessThanValidation(lessthanvalidation types.LessThanValidationVariant) *_validation { - u.v = &lessthanvalidation + u.v = lessthanvalidation.LessThanValidationCaster() return u } @@ -46,7 +46,7 @@ func (u *_lessThanValidation) ValidationCaster() *types.Validation { func (u *_validation) GreaterThanValidation(greaterthanvalidation types.GreaterThanValidationVariant) *_validation { - u.v = &greaterthanvalidation + u.v = greaterthanvalidation.GreaterThanValidationCaster() return u } @@ -59,7 +59,7 @@ func (u *_greaterThanValidation) ValidationCaster() *types.Validation { func (u *_validation) ListTypeValidation(listtypevalidation types.ListTypeValidationVariant) *_validation { - u.v = &listtypevalidation + u.v = listtypevalidation.ListTypeValidationCaster() return u } @@ -72,7 +72,7 @@ func (u *_listTypeValidation) ValidationCaster() *types.Validation { func (u *_validation) IncludedInValidation(includedinvalidation types.IncludedInValidationVariant) *_validation { - u.v = &includedinvalidation + u.v = includedinvalidation.IncludedInValidationCaster() return u } @@ -85,7 +85,7 @@ func (u *_includedInValidation) ValidationCaster() *types.Validation { func (u *_validation) RegexValidation(regexvalidation types.RegexValidationVariant) *_validation { - u.v = ®exvalidation + u.v = regexvalidation.RegexValidationCaster() return u } diff --git a/typedapi/esdsl/valuecountaggregation.go b/typedapi/esdsl/valuecountaggregation.go index 5b63f5fc85..e8d6f2860d 100644 --- a/typedapi/esdsl/valuecountaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/variablewidthhistogramaggregation.go b/typedapi/esdsl/variablewidthhistogramaggregation.go index 3fd775056a..a413f8b505 100644 --- a/typedapi/esdsl/variablewidthhistogramaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/versionproperty.go b/typedapi/esdsl/versionproperty.go index 4b2627c2f8..71d9743ef2 100644 --- a/typedapi/esdsl/versionproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/vertexdefinition.go b/typedapi/esdsl/vertexdefinition.go index 3b36d609e2..dfbe34b1f7 100644 --- a/typedapi/esdsl/vertexdefinition.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/vertexinclude.go b/typedapi/esdsl/vertexinclude.go index cc1d0ad02e..c4ab5b10bb 100644 --- a/typedapi/esdsl/vertexinclude.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/vocabulary.go b/typedapi/esdsl/vocabulary.go index cb829d24f9..111782ea96 100644 --- a/typedapi/esdsl/vocabulary.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/voyageaiservicesettings.go b/typedapi/esdsl/voyageaiservicesettings.go index a2f1d1d4d1..8213f6a4b5 100644 --- a/typedapi/esdsl/voyageaiservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/voyageaitasksettings.go b/typedapi/esdsl/voyageaitasksettings.go index ac585177d9..37ed643228 100644 --- a/typedapi/esdsl/voyageaitasksettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/waitforsnapshotaction.go b/typedapi/esdsl/waitforsnapshotaction.go index cfa264348e..1463742344 100644 --- a/typedapi/esdsl/waitforsnapshotaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/watch.go b/typedapi/esdsl/watch.go index 4479f7e706..2cbbc9274d 100644 --- a/typedapi/esdsl/watch.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/watcheraction.go b/typedapi/esdsl/watcheraction.go index 62d0ac7b60..e82de7e67a 100644 --- a/typedapi/esdsl/watcheraction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/watchercondition.go b/typedapi/esdsl/watchercondition.go index a60b6decb7..24cced7b18 100644 --- a/typedapi/esdsl/watchercondition.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/watcherinput.go b/typedapi/esdsl/watcherinput.go index 534a60853f..d52504e374 100644 --- a/typedapi/esdsl/watcherinput.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/watcherstatusactions.go b/typedapi/esdsl/watcherstatusactions.go index d9cf187e43..6ee304f028 100644 --- a/typedapi/esdsl/watcherstatusactions.go +++ b/typedapi/esdsl/watcherstatusactions.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/watchstatus.go b/typedapi/esdsl/watchstatus.go index ced6b1e781..ec0813e310 100644 --- a/typedapi/esdsl/watchstatus.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/watsonxservicesettings.go b/typedapi/esdsl/watsonxservicesettings.go index 71dfdb3ad7..28048c3640 100644 --- a/typedapi/esdsl/watsonxservicesettings.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/webhookaction.go b/typedapi/esdsl/webhookaction.go index 2724883425..bd1302a398 100644 --- a/typedapi/esdsl/webhookaction.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/weightedaverageaggregation.go b/typedapi/esdsl/weightedaverageaggregation.go index 2954972bda..5a42d1b213 100644 --- a/typedapi/esdsl/weightedaverageaggregation.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/weightedaveragevalue.go b/typedapi/esdsl/weightedaveragevalue.go index 97b91037b6..9c63674ffa 100644 --- a/typedapi/esdsl/weightedaveragevalue.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/weightedtokensquery.go b/typedapi/esdsl/weightedtokensquery.go index 4319e7591b..916c6948bf 100644 --- a/typedapi/esdsl/weightedtokensquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl @@ -57,24 +57,10 @@ func (s *_weightedTokensQuery) QueryName_(queryname_ string) *_weightedTokensQue return s } -func (s *_weightedTokensQuery) Tokens(tokens map[string]float32) *_weightedTokensQuery { +func (s *_weightedTokensQuery) Tokens(tokens []map[string]float32) *_weightedTokensQuery { s.v.Tokens = tokens - return s -} - -func (s *_weightedTokensQuery) AddToken(key string, value float32) *_weightedTokensQuery { - - var tmp map[string]float32 - if s.v.Tokens == nil { - s.v.Tokens = make(map[string]float32) - } else { - tmp = s.v.Tokens - } - - tmp[key] = value - s.v.Tokens = tmp return s } diff --git a/typedapi/esdsl/weights.go b/typedapi/esdsl/weights.go index 65cc9752fa..d31b99e854 100644 --- a/typedapi/esdsl/weights.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/whitespaceanalyzer.go b/typedapi/esdsl/whitespaceanalyzer.go index 718e7b56b1..c6bd2c47c9 100644 --- a/typedapi/esdsl/whitespaceanalyzer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/whitespacetokenizer.go b/typedapi/esdsl/whitespacetokenizer.go index 8f7fab685b..b391187922 100644 --- a/typedapi/esdsl/whitespacetokenizer.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/wildcardproperty.go b/typedapi/esdsl/wildcardproperty.go index eb1c0ef0b3..2d3a381b08 100644 --- a/typedapi/esdsl/wildcardproperty.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/wildcardquery.go b/typedapi/esdsl/wildcardquery.go index 23cedeed9f..022f5b8838 100644 --- a/typedapi/esdsl/wildcardquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/wktgeobounds.go b/typedapi/esdsl/wktgeobounds.go index 8e0a5882a9..377622c68e 100644 --- a/typedapi/esdsl/wktgeobounds.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/worddelimitergraphtokenfilter.go b/typedapi/esdsl/worddelimitergraphtokenfilter.go index 21ff39fb64..4136179978 100644 --- a/typedapi/esdsl/worddelimitergraphtokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/worddelimitertokenfilter.go b/typedapi/esdsl/worddelimitertokenfilter.go index e102fc89c6..34eb28e54a 100644 --- a/typedapi/esdsl/worddelimitertokenfilter.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/wrapperquery.go b/typedapi/esdsl/wrapperquery.go index 5f615e44bf..9f536d93ce 100644 --- a/typedapi/esdsl/wrapperquery.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/xlmrobertatokenizationconfig.go b/typedapi/esdsl/xlmrobertatokenizationconfig.go index 4d3f81c850..5567f7e2ba 100644 --- a/typedapi/esdsl/xlmrobertatokenizationconfig.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/zeroshotclassificationinferenceoptions.go b/typedapi/esdsl/zeroshotclassificationinferenceoptions.go index 03759d40a5..b4cace4cd2 100644 --- a/typedapi/esdsl/zeroshotclassificationinferenceoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esdsl/zeroshotclassificationinferenceupdateoptions.go b/typedapi/esdsl/zeroshotclassificationinferenceupdateoptions.go index d3d8f6fc6b..cd5ed4eef5 100644 --- a/typedapi/esdsl/zeroshotclassificationinferenceupdateoptions.go +++ b/typedapi/esdsl/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package esdsl diff --git a/typedapi/esql/asyncquery/async_query.go b/typedapi/esql/asyncquery/async_query.go index 85ce24c3d7..967e992c12 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 @@ -387,7 +375,7 @@ func (r *AsyncQuery) FilterPath(filterpaths ...string) *AsyncQuery { // 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 +// `"exists_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. @@ -454,6 +442,41 @@ func (r *AsyncQuery) IncludeCcsMetadata(includeccsmetadata bool) *AsyncQuery { return r } +// 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.DurationVariant) *AsyncQuery { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.KeepAlive = *duration.DurationCaster() + + return r +} + +// 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 { + // Initialize the request if it is not already initialized + 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 diff --git a/typedapi/esql/asyncquery/request.go b/typedapi/esql/asyncquery/request.go index c0e9a787ad..d66242da65 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package asyncquery @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package asyncquery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/async_query/AsyncQueryRequest.ts#L28-L138 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c59202ecda..1abac8d2a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete an async ES|QL query. // If the query is still running, it is cancelled. @@ -343,7 +343,7 @@ func (r *AsyncQueryDelete) FilterPath(filterpaths ...string) *AsyncQueryDelete { // 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 +// `"exists_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. diff --git a/typedapi/esql/asyncquerydelete/response.go b/typedapi/esql/asyncquerydelete/response.go index cb18fcd254..033475eba3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package asyncquerydelete // Response holds the response body struct for the package asyncquerydelete // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/async_query_delete/AsyncQueryDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/async_query_delete/AsyncQueryDeleteResponse.ts#L22-L25 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 7bbece2b9a..b4a4c8f1a2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/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. @@ -369,7 +378,7 @@ func (r *AsyncQueryGet) FilterPath(filterpaths ...string) *AsyncQueryGet { // 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 +// `"exists_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. diff --git a/typedapi/esql/asyncquerystop/async_query_stop.go b/typedapi/esql/asyncquerystop/async_query_stop.go index c2ef50447c..608087b9de 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Stop async ES|QL query. // @@ -348,7 +348,7 @@ func (r *AsyncQueryStop) FilterPath(filterpaths ...string) *AsyncQueryStop { // 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 +// `"exists_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. diff --git a/typedapi/esql/getquery/get_query.go b/typedapi/esql/getquery/get_query.go index a877e39316..3f351b9470 100644 --- a/typedapi/esql/getquery/get_query.go +++ b/typedapi/esql/getquery/get_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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get a specific running ES|QL query information. // Returns an object extended information about a running ES|QL query. @@ -143,6 +143,10 @@ func (r *GetQuery) HttpRequest(ctx context.Context) (*http.Request, error) { } } + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + if err != nil { return req, fmt.Errorf("could not build http.Request: %w", err) } @@ -325,7 +329,7 @@ func (r *GetQuery) FilterPath(filterpaths ...string) *GetQuery { // 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 +// `"exists_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. diff --git a/typedapi/esql/getquery/response.go b/typedapi/esql/getquery/response.go index e8a3b6979a..c7a7c788c0 100644 --- a/typedapi/esql/getquery/response.go +++ b/typedapi/esql/getquery/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getquery // Response holds the response body struct for the package getquery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/get_query/GetQueryResponse.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/get_query/GetQueryResponse.ts#L23-L33 type Response struct { CoordinatingNode string `json:"coordinating_node"` DataNodes []string `json:"data_nodes"` diff --git a/typedapi/esql/listqueries/list_queries.go b/typedapi/esql/listqueries/list_queries.go index 599cff3698..523ab2224d 100644 --- a/typedapi/esql/listqueries/list_queries.go +++ b/typedapi/esql/listqueries/list_queries.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get running ES|QL queries information. // Returns an object containing IDs and other information about the running @@ -131,6 +131,10 @@ func (r *ListQueries) HttpRequest(ctx context.Context) (*http.Request, error) { } } + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + if err != nil { return req, fmt.Errorf("could not build http.Request: %w", err) } @@ -304,7 +308,7 @@ func (r *ListQueries) FilterPath(filterpaths ...string) *ListQueries { // 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 +// `"exists_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. diff --git a/typedapi/esql/listqueries/response.go b/typedapi/esql/listqueries/response.go index a34d32f2f3..6d80098822 100644 --- a/typedapi/esql/listqueries/response.go +++ b/typedapi/esql/listqueries/response.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package listqueries @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package listqueries // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/list_queries/ListQueriesResponse.ts#L32-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/list_queries/ListQueriesResponse.ts#L32-L36 type Response struct { Queries map[string]types.Body `json:"queries"` } diff --git a/typedapi/esql/query/query.go b/typedapi/esql/query/query.go index 695cba06df..3b1d8ca55e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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)) @@ -352,7 +359,7 @@ func (r *Query) FilterPath(filterpaths ...string) *Query { // 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 +// `"exists_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. diff --git a/typedapi/esql/query/request.go b/typedapi/esql/query/request.go index ef91d4f7cd..95603bfc44 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package query @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/query/QueryRequest.ts#L27-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5da7d587e2..9db7299332 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the features. // Get a list of features that can be included in snapshots using the @@ -340,7 +340,7 @@ func (r *GetFeatures) FilterPath(filterpaths ...string) *GetFeatures { // 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 +// `"exists_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. diff --git a/typedapi/features/getfeatures/response.go b/typedapi/features/getfeatures/response.go index 018a37a6fd..be9d70fb42 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getfeatures @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getfeatures // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/features/get_features/GetFeaturesResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c68d2e2d25..ade72e67b2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Reset the features. // Clear all of the state information stored in system indices by Elasticsearch @@ -356,7 +356,7 @@ func (r *ResetFeatures) FilterPath(filterpaths ...string) *ResetFeatures { // 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 +// `"exists_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. diff --git a/typedapi/features/resetfeatures/response.go b/typedapi/features/resetfeatures/response.go index 77171f64e2..28b0accfb1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package resetfeatures @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package resetfeatures // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/features/reset_features/ResetFeaturesResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7451cddc6f..7fe855d4ac 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get global checkpoints. // @@ -381,7 +381,7 @@ func (r *GlobalCheckpoints) FilterPath(filterpaths ...string) *GlobalCheckpoints // 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 +// `"exists_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. diff --git a/typedapi/fleet/globalcheckpoints/response.go b/typedapi/fleet/globalcheckpoints/response.go index 10a3fcd898..6645945957 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package globalcheckpoints // Response holds the response body struct for the package globalcheckpoints // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/fleet/global_checkpoints/GlobalCheckpointsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3c6d71015a..5963b9c24c 100644 --- a/typedapi/fleet/msearch/msearch.go +++ b/typedapi/fleet/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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run multiple Fleet searches. // Run several Fleet searches with a single API request. @@ -496,7 +496,7 @@ func (r *Msearch) FilterPath(filterpaths ...string) *Msearch { // 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 +// `"exists_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. diff --git a/typedapi/fleet/msearch/request.go b/typedapi/fleet/msearch/request.go index b4e1f341d1..a300f2552f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package msearch @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/fleet/msearch/MultiSearchRequest.ts#L31-L126 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/fleet/msearch/MultiSearchRequest.ts#L31-L126 type Request = []types.MsearchRequestItem diff --git a/typedapi/fleet/msearch/response.go b/typedapi/fleet/msearch/response.go index 94c8ec2a79..7db987d2ec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package msearch @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package msearch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/fleet/msearch/MultiSearchResponse.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bfd987aca9..d935d4db93 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Creates a secret stored by Fleet. package postsecret diff --git a/typedapi/fleet/search/request.go b/typedapi/fleet/search/request.go index 6f312bd74b..2ea620305f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package search @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/fleet/search/SearchRequest.ts#L54-L266 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/fleet/search/SearchRequest.ts#L54-L266 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 2b67f5f8d9..c356b76359 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package search @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/fleet/search/SearchResponse.ts#L33-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6e00ea1238..3909386e45 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run a Fleet search. // The purpose of the Fleet search API is to provide an API where the search @@ -575,7 +575,7 @@ func (r *Search) FilterPath(filterpaths ...string) *Search { // 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 +// `"exists_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. diff --git a/typedapi/graph/explore/explore.go b/typedapi/graph/explore/explore.go index 84c433a8b3..bfe5d2d062 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Explore graph analytics. // Extract and summarize information about the documents and terms in an @@ -376,7 +376,7 @@ func (r *Explore) FilterPath(filterpaths ...string) *Explore { // 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 +// `"exists_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. diff --git a/typedapi/graph/explore/request.go b/typedapi/graph/explore/request.go index 7b7ff7d0e0..7956e58c36 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package explore @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package explore // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/graph/explore/GraphExploreRequest.ts#L28-L84 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c30f9f8f41..74312c452e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package explore @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explore // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/graph/explore/GraphExploreResponse.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 90775cc144..18c6059512 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a lifecycle policy. // You cannot delete policies that are currently in use. If the policy is being @@ -345,7 +345,7 @@ func (r *DeleteLifecycle) FilterPath(filterpaths ...string) *DeleteLifecycle { // 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 +// `"exists_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. diff --git a/typedapi/ilm/deletelifecycle/response.go b/typedapi/ilm/deletelifecycle/response.go index f14c6da0ed..fa214f79a2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletelifecycle // Response holds the response body struct for the package deletelifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/delete_lifecycle/DeleteLifecycleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/delete_lifecycle/DeleteLifecycleResponse.ts#L22-L25 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 dfd2421263..e5bd9ff716 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Explain the lifecycle state. // Get the current lifecycle status for one or more indices. @@ -364,7 +364,7 @@ func (r *ExplainLifecycle) FilterPath(filterpaths ...string) *ExplainLifecycle { // 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 +// `"exists_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. diff --git a/typedapi/ilm/explainlifecycle/response.go b/typedapi/ilm/explainlifecycle/response.go index 0cc0f31b0f..29634eeb82 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package explainlifecycle @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package explainlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/explain_lifecycle/ExplainLifecycleResponse.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bf6c651244..dfb9bcbcc2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get lifecycle policies. package getlifecycle @@ -346,7 +346,7 @@ func (r *GetLifecycle) FilterPath(filterpaths ...string) *GetLifecycle { // 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 +// `"exists_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. diff --git a/typedapi/ilm/getlifecycle/response.go b/typedapi/ilm/getlifecycle/response.go index 7c1e929428..688269210b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getlifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/get_lifecycle/GetLifecycleResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3dcb78641a..164328a547 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the ILM status. // @@ -304,7 +304,7 @@ func (r *GetStatus) FilterPath(filterpaths ...string) *GetStatus { // 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 +// `"exists_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. diff --git a/typedapi/ilm/getstatus/response.go b/typedapi/ilm/getstatus/response.go index 4aa99c829c..d106db5ed2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getstatus @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getstatus // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/get_status/GetIlmStatusResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bd3cfa32f6..4e08a1d549 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Migrate to data tiers routing. // Switch the indices, ILM policies, and legacy, composable, and component @@ -374,7 +374,7 @@ func (r *MigrateToDataTiers) FilterPath(filterpaths ...string) *MigrateToDataTie // 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 +// `"exists_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. diff --git a/typedapi/ilm/migratetodatatiers/request.go b/typedapi/ilm/migratetodatatiers/request.go index 2d3f6181bc..22a3311f63 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package migratetodatatiers @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package migratetodatatiers // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/migrate_to_data_tiers/Request.ts#L23-L69 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/migrate_to_data_tiers/Request.ts#L23-L69 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 8ea4ec056f..b474d3b3e0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package migratetodatatiers @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package migratetodatatiers // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/migrate_to_data_tiers/Response.ts#L22-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d7143c2c08..20b5f5d604 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Move to a lifecycle step. // Manually move an index into a specific step in the lifecycle policy and run @@ -383,7 +383,7 @@ func (r *MoveToStep) FilterPath(filterpaths ...string) *MoveToStep { // 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 +// `"exists_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. diff --git a/typedapi/ilm/movetostep/request.go b/typedapi/ilm/movetostep/request.go index b6e8d06914..21211d5c4a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package movetostep @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package movetostep // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/move_to_step/MoveToStepRequest.ts#L24-L64 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fe255c0ec6..0ddaba9757 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package movetostep // Response holds the response body struct for the package movetostep // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/move_to_step/MoveToStepResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/move_to_step/MoveToStepResponse.ts#L22-L25 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 069193d199..5d65e3d33c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a lifecycle policy. // If the specified policy exists, it is replaced and the policy version is @@ -365,7 +365,7 @@ func (r *PutLifecycle) FilterPath(filterpaths ...string) *PutLifecycle { // 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 +// `"exists_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. diff --git a/typedapi/ilm/putlifecycle/request.go b/typedapi/ilm/putlifecycle/request.go index 9140228ca0..8872f0260f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putlifecycle @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/put_lifecycle/PutLifecycleRequest.ts#L25-L66 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0695076f1d..28376dbfeb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putlifecycle // Response holds the response body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/put_lifecycle/PutLifecycleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/put_lifecycle/PutLifecycleResponse.ts#L22-L25 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 f5cbf5175a..d2754b06d1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Remove policies from an index. // Remove the assigned lifecycle policies from an index or a data stream's @@ -329,7 +329,7 @@ func (r *RemovePolicy) FilterPath(filterpaths ...string) *RemovePolicy { // 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 +// `"exists_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. diff --git a/typedapi/ilm/removepolicy/response.go b/typedapi/ilm/removepolicy/response.go index 53c3169cb4..743327df67 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package removepolicy // Response holds the response body struct for the package removepolicy // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/remove_policy/RemovePolicyResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5d301311fe..80c56e0aee 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package retry // Response holds the response body struct for the package retry // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/retry/RetryIlmResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/retry/RetryIlmResponse.ts#L22-L25 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 0a4e47572b..59adf4e1c1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Retry a policy. // Retry running the lifecycle policy for an index that is in the ERROR step. @@ -334,7 +334,7 @@ func (r *Retry) FilterPath(filterpaths ...string) *Retry { // 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 +// `"exists_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. diff --git a/typedapi/ilm/start/response.go b/typedapi/ilm/start/response.go index be6f8e25c0..cd625de232 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package start // Response holds the response body struct for the package start // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/start/StartIlmResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/start/StartIlmResponse.ts#L22-L25 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 be869b6ba1..ada1c0ae2a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Start the ILM plugin. // Start the index lifecycle management plugin if it is currently stopped. @@ -326,7 +326,7 @@ func (r *Start) FilterPath(filterpaths ...string) *Start { // 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 +// `"exists_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. diff --git a/typedapi/ilm/stop/response.go b/typedapi/ilm/stop/response.go index 29a008ed06..696249f8e0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stop // Response holds the response body struct for the package stop // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/stop/StopIlmResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/stop/StopIlmResponse.ts#L22-L25 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 f30ad4d985..a9e773cd50 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Stop the ILM plugin. // Halt all lifecycle management operations and stop the index lifecycle @@ -336,7 +336,7 @@ func (r *Stop) FilterPath(filterpaths ...string) *Stop { // 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 +// `"exists_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. diff --git a/typedapi/indices/addblock/add_block.go b/typedapi/indices/addblock/add_block.go index d1f506ea9f..c35a40399e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Add an index block. // @@ -417,7 +417,7 @@ func (r *AddBlock) FilterPath(filterpaths ...string) *AddBlock { // 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 +// `"exists_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. diff --git a/typedapi/indices/addblock/response.go b/typedapi/indices/addblock/response.go index 7267845e98..26b9c8236e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package addblock @@ -26,11 +26,11 @@ import ( // Response holds the response body struct for the package addblock // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/add_block/IndicesAddBlockResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/add_block/IndicesAddBlockResponse.ts#L22-L28 type Response struct { - Acknowledged bool `json:"acknowledged"` - Indices []types.IndicesBlockStatus `json:"indices"` - ShardsAcknowledged bool `json:"shards_acknowledged"` + Acknowledged bool `json:"acknowledged"` + Indices []types.AddIndicesBlockStatus `json:"indices"` + ShardsAcknowledged bool `json:"shards_acknowledged"` } // NewResponse returns a Response diff --git a/typedapi/indices/analyze/analyze.go b/typedapi/indices/analyze/analyze.go index 778146cd86..c2ca2a1a5d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get tokens from text analysis. // The analyze API performs analysis on a text string and returns the resulting @@ -359,7 +359,7 @@ func (r *Analyze) FilterPath(filterpaths ...string) *Analyze { // 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 +// `"exists_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. diff --git a/typedapi/indices/analyze/request.go b/typedapi/indices/analyze/request.go index 21e3a4647e..7f3adb63ea 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package analyze @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package analyze // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/analyze/IndicesAnalyzeRequest.ts#L27-L119 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f3eb78dad1..41def59f90 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package analyze @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package analyze // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/analyze/IndicesAnalyzeResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 90c43c7d7e..8ec061fb51 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Cancel a migration reindex operation. // @@ -335,7 +335,7 @@ func (r *CancelMigrateReindex) FilterPath(filterpaths ...string) *CancelMigrateR // 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 +// `"exists_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. diff --git a/typedapi/indices/cancelmigratereindex/response.go b/typedapi/indices/cancelmigratereindex/response.go index 58bfac0bd6..7e2afcc58a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package cancelmigratereindex // Response holds the response body struct for the package cancelmigratereindex // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/cancel_migrate_reindex/MigrateCancelReindexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/cancel_migrate_reindex/MigrateCancelReindexResponse.ts#L22-L25 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 7fe7d1240a..d79cfb2a08 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -415,7 +414,7 @@ func (r *ClearCache) FilterPath(filterpaths ...string) *ClearCache { // 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 +// `"exists_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. diff --git a/typedapi/indices/clearcache/response.go b/typedapi/indices/clearcache/response.go index ba68bde947..497e62d6d7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clearcache @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcache // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/clear_cache/IndicesClearCacheResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/clear_cache/IndicesClearCacheResponse.ts#L22-L25 type Response struct { Shards_ *types.ShardStatistics `json:"_shards,omitempty"` } diff --git a/typedapi/indices/clone/clone.go b/typedapi/indices/clone/clone.go index 80f9b58b77..ec2c25a25f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clone an index. // Clone an existing index into a new index. @@ -526,7 +526,7 @@ func (r *Clone) FilterPath(filterpaths ...string) *Clone { // 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 +// `"exists_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. diff --git a/typedapi/indices/clone/request.go b/typedapi/indices/clone/request.go index b3df205853..901e0774c4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clone @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/clone/IndicesCloneRequest.ts#L27-L127 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 59833bb350..257f3a5b63 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clone // Response holds the response body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/clone/IndicesCloneResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5d97703376..d053fb22c9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -445,7 +444,7 @@ func (r *Close) FilterPath(filterpaths ...string) *Close { // 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 +// `"exists_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. diff --git a/typedapi/indices/close/response.go b/typedapi/indices/close/response.go index c3a5d530b7..f544787fc0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package close @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package close // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/close/CloseIndexResponse.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 311c0b0fae..42b6f046b0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create an index. // You can use the create index API to add a new index to an Elasticsearch @@ -369,6 +369,19 @@ func (r *Create) Header(key, value string) *Create { } // Index Name of the index you wish to create. +// Index names must meet the following criteria: +// +// * Lowercase only +// * Cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, ` ` (space +// character), `,`, or `#` +// * Indices prior to 7.0 could contain a colon (`:`), but that has been +// deprecated and will not be supported in later versions +// * Cannot start with `-`, `_`, or `+` +// * Cannot be `.` or `..` +// * Cannot be longer than 255 bytes (note thtat it is bytes, so multi-byte +// characters will reach the limit faster) +// * Names starting with `.` are deprecated, except for hidden indices and +// internal indices managed by plugins // API Name: index func (r *Create) _index(index string) *Create { r.paramSet |= indexMask @@ -432,7 +445,7 @@ func (r *Create) FilterPath(filterpaths ...string) *Create { // 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 +// `"exists_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. diff --git a/typedapi/indices/create/request.go b/typedapi/indices/create/request.go index d3d141fa9c..411349084e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package create @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/create/IndicesCreateRequest.ts#L28-L108 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/create/IndicesCreateRequest.ts#L28-L115 type Request struct { // Aliases Aliases for the index. diff --git a/typedapi/indices/create/response.go b/typedapi/indices/create/response.go index acbe63b5c0..48d706a459 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package create // Response holds the response body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/create/IndicesCreateResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f7c0034965..4e62206c26 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a data stream. // @@ -350,7 +350,7 @@ func (r *CreateDataStream) FilterPath(filterpaths ...string) *CreateDataStream { // 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 +// `"exists_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. diff --git a/typedapi/indices/createdatastream/response.go b/typedapi/indices/createdatastream/response.go index a2388388e3..0e748b935c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package createdatastream // Response holds the response body struct for the package createdatastream // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/create_data_stream/IndicesCreateDataStreamResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/create_data_stream/IndicesCreateDataStreamResponse.ts#L22-L25 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 d891ef4bf4..0989b21626 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create an index from a source index. // @@ -361,7 +361,7 @@ func (r *CreateFrom) FilterPath(filterpaths ...string) *CreateFrom { // 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 +// `"exists_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. diff --git a/typedapi/indices/createfrom/request.go b/typedapi/indices/createfrom/request.go index 9bec659097..736ee7eb07 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package createfrom @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package createfrom // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/create_from/MigrateCreateFromRequest.ts#L25-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0634ffc5d4..35f084332d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package createfrom // Response holds the response body struct for the package createfrom // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/create_from/MigrateCreateFromResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 329c9dff3e..322edbb1cb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get data stream stats. // @@ -348,7 +348,7 @@ func (r *DataStreamsStats) FilterPath(filterpaths ...string) *DataStreamsStats { // 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 +// `"exists_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. diff --git a/typedapi/indices/datastreamsstats/response.go b/typedapi/indices/datastreamsstats/response.go index 5a9b0262f4..2471193fe9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package datastreamsstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package datastreamsstats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L25-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8c059ebad4..2fdfcc4095 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -395,7 +394,7 @@ func (r *Delete) FilterPath(filterpaths ...string) *Delete { // 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 +// `"exists_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. diff --git a/typedapi/indices/delete/response.go b/typedapi/indices/delete/response.go index ee61169bc9..e6d95ed194 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package delete @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/delete/IndicesDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete/IndicesDeleteResponse.ts#L22-L25 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 1d5fa768f7..d09974d02d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete an alias. // Removes a data stream or index from an alias. @@ -382,7 +382,7 @@ func (r *DeleteAlias) FilterPath(filterpaths ...string) *DeleteAlias { // 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 +// `"exists_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. diff --git a/typedapi/indices/deletealias/response.go b/typedapi/indices/deletealias/response.go index 0428213aa0..ce78339b1b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletealias // Response holds the response body struct for the package deletealias // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/delete_alias/IndicesDeleteAliasResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete_alias/IndicesDeleteAliasResponse.ts#L22-L25 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 d6c6a5c265..6d11e5c414 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete data stream lifecycles. // Removes the data stream lifecycle from a data stream, rendering it not @@ -358,7 +358,7 @@ func (r *DeleteDataLifecycle) FilterPath(filterpaths ...string) *DeleteDataLifec // 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 +// `"exists_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. diff --git a/typedapi/indices/deletedatalifecycle/response.go b/typedapi/indices/deletedatalifecycle/response.go index 55c78a04d5..1e88fe3e7a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletedatalifecycle // Response holds the response body struct for the package deletedatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete_data_lifecycle/IndicesDeleteDataLifecycleResponse.ts#L22-L25 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 ba4bd6b007..4734d03df2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete data streams. // Deletes one or more data streams and their backing indices. @@ -347,7 +347,7 @@ func (r *DeleteDataStream) FilterPath(filterpaths ...string) *DeleteDataStream { // 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 +// `"exists_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. diff --git a/typedapi/indices/deletedatastream/response.go b/typedapi/indices/deletedatastream/response.go index 2ed9bfc013..ae38a1b577 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletedatastream // Response holds the response body struct for the package deletedatastream // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete_data_stream/IndicesDeleteDataStreamResponse.ts#L22-L25 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/deletedatastreamoptions/delete_data_stream_options.go b/typedapi/indices/deletedatastreamoptions/delete_data_stream_options.go new file mode 100644 index 0000000000..edb2b5755d --- /dev/null +++ b/typedapi/indices/deletedatastreamoptions/delete_data_stream_options.go @@ -0,0 +1,377 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +// Delete data stream options. +// Removes the data stream options from a data stream. +package deletedatastreamoptions + +import ( + "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/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/expandwildcard" +) + +const ( + nameMask = iota + 1 +) + +// 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 DeleteDataStreamOptions struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + name string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewDeleteDataStreamOptions type alias for index. +type NewDeleteDataStreamOptions func(name string) *DeleteDataStreamOptions + +// NewDeleteDataStreamOptionsFunc returns a new instance of DeleteDataStreamOptions with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewDeleteDataStreamOptionsFunc(tp elastictransport.Interface) NewDeleteDataStreamOptions { + return func(name string) *DeleteDataStreamOptions { + n := New(tp) + + n._name(name) + + return n + } +} + +// Delete data stream options. +// Removes the data stream options from a data stream. +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html +func New(tp elastictransport.Interface) *DeleteDataStreamOptions { + r := &DeleteDataStreamOptions{ + 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 *DeleteDataStreamOptions) 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 == nameMask: + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", r.name) + } + path.WriteString(r.name) + path.WriteString("/") + path.WriteString("_options") + + method = http.MethodDelete + } + + 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=9") + } + + 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 DeleteDataStreamOptions) 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, "indices.delete_data_stream_options") + 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, "indices.delete_data_stream_options") + if reader := instrument.RecordRequestBody(ctx, "indices.delete_data_stream_options", 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", "indices.delete_data_stream_options") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the DeleteDataStreamOptions 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 deletedatastreamoptions.Response +func (r DeleteDataStreamOptions) 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, "indices.delete_data_stream_options") + 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 +} + +// 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 DeleteDataStreamOptions) 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, "indices.delete_data_stream_options") + 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 DeleteDataStreamOptions 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 DeleteDataStreamOptions headers map. +func (r *DeleteDataStreamOptions) Header(key, value string) *DeleteDataStreamOptions { + r.headers.Set(key, value) + + return r +} + +// Name A comma-separated list of data streams of which the data stream options will +// be deleted; use `*` to get all data streams +// API Name: name +func (r *DeleteDataStreamOptions) _name(name string) *DeleteDataStreamOptions { + r.paramSet |= nameMask + r.name = name + + return r +} + +// ExpandWildcards Whether wildcard expressions should get expanded to open or closed indices +// (default: open) +// API name: expand_wildcards +func (r *DeleteDataStreamOptions) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *DeleteDataStreamOptions { + tmp := []string{} + for _, item := range expandwildcards { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) + + return r +} + +// MasterTimeout Specify timeout for connection to master +// API name: master_timeout +func (r *DeleteDataStreamOptions) MasterTimeout(duration string) *DeleteDataStreamOptions { + r.values.Set("master_timeout", duration) + + return r +} + +// Timeout Explicit timestamp for the document +// API name: timeout +func (r *DeleteDataStreamOptions) Timeout(duration string) *DeleteDataStreamOptions { + 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 *DeleteDataStreamOptions) ErrorTrace(errortrace bool) *DeleteDataStreamOptions { + 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 *DeleteDataStreamOptions) FilterPath(filterpaths ...string) *DeleteDataStreamOptions { + 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 +// `"exists_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 *DeleteDataStreamOptions) Human(human bool) *DeleteDataStreamOptions { + 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 *DeleteDataStreamOptions) Pretty(pretty bool) *DeleteDataStreamOptions { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/indices/deletedatastreamoptions/response.go b/typedapi/indices/deletedatastreamoptions/response.go new file mode 100644 index 0000000000..5e60d8a9e8 --- /dev/null +++ b/typedapi/indices/deletedatastreamoptions/response.go @@ -0,0 +1,37 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package deletedatastreamoptions + +// Response holds the response body struct for the package deletedatastreamoptions +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete_data_stream_options/IndicesDeleteDataStreamOptionsResponse.ts#L22-L25 +type Response struct { + + // Acknowledged For a successful response, this value is always true. On failure, an + // exception is returned instead. + Acknowledged bool `json:"acknowledged"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/deleteindextemplate/delete_index_template.go b/typedapi/indices/deleteindextemplate/delete_index_template.go index 534a7c37a2..eb351ba392 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete an index template. // The provided may contain multiple template names separated @@ -350,7 +350,7 @@ func (r *DeleteIndexTemplate) FilterPath(filterpaths ...string) *DeleteIndexTemp // 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 +// `"exists_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. diff --git a/typedapi/indices/deleteindextemplate/response.go b/typedapi/indices/deleteindextemplate/response.go index 16fcd26196..de743cb3c3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleteindextemplate // Response holds the response body struct for the package deleteindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/delete_index_template/IndicesDeleteIndexTemplateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete_index_template/IndicesDeleteIndexTemplateResponse.ts#L22-L25 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 c7862ea9fc..b39b8af813 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-indices-delete-template func New(tp elastictransport.Interface) *DeleteTemplate { @@ -342,7 +348,7 @@ func (r *DeleteTemplate) FilterPath(filterpaths ...string) *DeleteTemplate { // 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 +// `"exists_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. diff --git a/typedapi/indices/deletetemplate/response.go b/typedapi/indices/deletetemplate/response.go index 90ada7ce9b..522dffc81d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletetemplate // Response holds the response body struct for the package deletetemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/delete_template/IndicesDeleteTemplateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/delete_template/IndicesDeleteTemplateResponse.ts#L22-L25 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 c008a296b8..d3b4a197de 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Analyze the index disk usage. // Analyze the disk usage of each field of an index or data stream. @@ -406,7 +406,7 @@ func (r *DiskUsage) FilterPath(filterpaths ...string) *DiskUsage { // 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 +// `"exists_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. diff --git a/typedapi/indices/diskusage/response.go b/typedapi/indices/diskusage/response.go index 8e6bfbbbd9..57fc46d242 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package diskusage @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package diskusage // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/disk_usage/IndicesDiskUsageResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 07ccaaaa7a..6f79b18876 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Downsample an index. // Aggregate a time series (TSDS) index and store pre-computed statistical @@ -377,7 +377,7 @@ func (r *Downsample) FilterPath(filterpaths ...string) *Downsample { // 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 +// `"exists_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. diff --git a/typedapi/indices/downsample/request.go b/typedapi/indices/downsample/request.go index f5bb91302d..edc46d716a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package downsample @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package downsample // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/downsample/Request.ts#L24-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c9b2d1cb8c..bc2425e6ba 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package downsample @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package downsample // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/downsample/Response.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8c402458f3..c3537bae53 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -331,7 +330,7 @@ func (r *Exists) FilterPath(filterpaths ...string) *Exists { // 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 +// `"exists_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. diff --git a/typedapi/indices/existsalias/exists_alias.go b/typedapi/indices/existsalias/exists_alias.go index 2025d5a07a..6f69e0d6f9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -352,7 +351,7 @@ func (r *ExistsAlias) FilterPath(filterpaths ...string) *ExistsAlias { // 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 +// `"exists_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. diff --git a/typedapi/indices/existsindextemplate/exists_index_template.go b/typedapi/indices/existsindextemplate/exists_index_template.go index 74b17f4389..c5e1eb85fb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Check index templates. // @@ -301,7 +301,7 @@ func (r *ExistsIndexTemplate) FilterPath(filterpaths ...string) *ExistsIndexTemp // 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 +// `"exists_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. diff --git a/typedapi/indices/existstemplate/exists_template.go b/typedapi/indices/existstemplate/exists_template.go index 262133fc15..a2058a7828 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Check existence of index templates. // Get information about whether index templates exist. @@ -312,7 +312,7 @@ func (r *ExistsTemplate) FilterPath(filterpaths ...string) *ExistsTemplate { // 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 +// `"exists_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. diff --git a/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go b/typedapi/indices/explaindatalifecycle/explain_data_lifecycle.go index dd14d12251..dd92ff8b9e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the status for a data stream lifecycle. // Get information about an index or data stream's current data stream lifecycle @@ -348,7 +348,7 @@ func (r *ExplainDataLifecycle) FilterPath(filterpaths ...string) *ExplainDataLif // 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 +// `"exists_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. diff --git a/typedapi/indices/explaindatalifecycle/response.go b/typedapi/indices/explaindatalifecycle/response.go index ab2794b457..7a81b933f7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package explaindatalifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explaindatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 77e45d5e26..a32dd29f03 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get field usage stats. // Get field usage information for each shard and field of an index. @@ -387,7 +387,7 @@ func (r *FieldUsageStats) FilterPath(filterpaths ...string) *FieldUsageStats { // 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 +// `"exists_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. diff --git a/typedapi/indices/fieldusagestats/response.go b/typedapi/indices/fieldusagestats/response.go index 1761b07c0c..a64f8ca2c3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package fieldusagestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package fieldusagestats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L28-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L28-L31 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 ef28d8746f..8132c1b598 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -429,7 +428,7 @@ func (r *Flush) FilterPath(filterpaths ...string) *Flush { // 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 +// `"exists_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. diff --git a/typedapi/indices/flush/response.go b/typedapi/indices/flush/response.go index 8a7191eea6..62e66ae38f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package flush @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package flush // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/flush/IndicesFlushResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/flush/IndicesFlushResponse.ts#L22-L25 type Response struct { Shards_ *types.ShardStatistics `json:"_shards,omitempty"` } diff --git a/typedapi/indices/forcemerge/forcemerge.go b/typedapi/indices/forcemerge/forcemerge.go index eaf86c22c1..4aa61d27e3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Force a merge. // Perform the force merge operation on the shards of one or more indices. @@ -550,7 +550,7 @@ func (r *Forcemerge) FilterPath(filterpaths ...string) *Forcemerge { // 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 +// `"exists_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. diff --git a/typedapi/indices/forcemerge/response.go b/typedapi/indices/forcemerge/response.go index 8e0f64d17d..0633e0c595 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package forcemerge @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package forcemerge // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/forcemerge/IndicesForceMergeResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/forcemerge/IndicesForceMergeResponse.ts#L22-L25 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 790831888d..9ddc3782bb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get index information. // Get information about one or more indices. For data streams, the API returns @@ -412,7 +412,7 @@ func (r *Get) FilterPath(filterpaths ...string) *Get { // 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 +// `"exists_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. diff --git a/typedapi/indices/get/response.go b/typedapi/indices/get/response.go index 228f80aaf8..45b9170d06 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get/IndicesGetResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 637b353971..62fc7b91e1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -454,7 +416,7 @@ func (r *GetAlias) FilterPath(filterpaths ...string) *GetAlias { // 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 +// `"exists_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. diff --git a/typedapi/indices/getalias/response.go b/typedapi/indices/getalias/response.go index ad656252fc..67e8cd1b36 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getalias @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getalias // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_alias/IndicesGetAliasResponse.ts#L26-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ead6d8bbeb..543ad7141f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -361,7 +360,7 @@ func (r *GetDataLifecycle) FilterPath(filterpaths ...string) *GetDataLifecycle { // 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 +// `"exists_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. diff --git a/typedapi/indices/getdatalifecycle/response.go b/typedapi/indices/getdatalifecycle/response.go index 225845252d..d3895a2d6d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getdatalifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e8bcf1c944..defb984b17 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get data stream lifecycle stats. // Get statistics about the data streams that are managed by a data stream @@ -304,7 +304,7 @@ func (r *GetDataLifecycleStats) FilterPath(filterpaths ...string) *GetDataLifecy // 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 +// `"exists_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. diff --git a/typedapi/indices/getdatalifecyclestats/response.go b/typedapi/indices/getdatalifecyclestats/response.go index caafb37f61..44bf69c6e1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getdatalifecyclestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatalifecyclestats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L24-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1f1c494cb5..f4bbc9d70a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get data streams. // @@ -370,7 +370,7 @@ func (r *GetDataStream) FilterPath(filterpaths ...string) *GetDataStream { // 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 +// `"exists_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. diff --git a/typedapi/indices/getdatastream/response.go b/typedapi/indices/getdatastream/response.go index 38fbe8498b..3ea8c900f1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getdatastream @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatastream // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_stream/IndicesGetDataStreamResponse.ts#L22-L24 type Response struct { DataStreams []types.DataStream `json:"data_streams"` } diff --git a/typedapi/indices/getdatastreamoptions/get_data_stream_options.go b/typedapi/indices/getdatastreamoptions/get_data_stream_options.go new file mode 100644 index 0000000000..a9a9403ef7 --- /dev/null +++ b/typedapi/indices/getdatastreamoptions/get_data_stream_options.go @@ -0,0 +1,373 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +// Get data stream options. +// +// Get the data stream options configuration of one or more data streams. +package getdatastreamoptions + +import ( + "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/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/expandwildcard" +) + +const ( + nameMask = iota + 1 +) + +// 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 GetDataStreamOptions struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + name string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewGetDataStreamOptions type alias for index. +type NewGetDataStreamOptions func(name string) *GetDataStreamOptions + +// NewGetDataStreamOptionsFunc returns a new instance of GetDataStreamOptions with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewGetDataStreamOptionsFunc(tp elastictransport.Interface) NewGetDataStreamOptions { + return func(name string) *GetDataStreamOptions { + n := New(tp) + + n._name(name) + + return n + } +} + +// Get data stream options. +// +// Get the data stream options configuration of one or more data streams. +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html +func New(tp elastictransport.Interface) *GetDataStreamOptions { + r := &GetDataStreamOptions{ + 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 *GetDataStreamOptions) 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 == nameMask: + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", r.name) + } + path.WriteString(r.name) + path.WriteString("/") + path.WriteString("_options") + + 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=9") + } + + 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 GetDataStreamOptions) 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, "indices.get_data_stream_options") + 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, "indices.get_data_stream_options") + if reader := instrument.RecordRequestBody(ctx, "indices.get_data_stream_options", 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", "indices.get_data_stream_options") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the GetDataStreamOptions 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 getdatastreamoptions.Response +func (r GetDataStreamOptions) 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, "indices.get_data_stream_options") + 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 +} + +// 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 GetDataStreamOptions) 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, "indices.get_data_stream_options") + 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 GetDataStreamOptions 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 GetDataStreamOptions headers map. +func (r *GetDataStreamOptions) Header(key, value string) *GetDataStreamOptions { + r.headers.Set(key, value) + + return r +} + +// Name Comma-separated list of data streams to limit the request. +// Supports wildcards (`*`). +// To target all data streams, omit this parameter or use `*` or `_all`. +// API Name: name +func (r *GetDataStreamOptions) _name(name string) *GetDataStreamOptions { + r.paramSet |= nameMask + r.name = name + + return r +} + +// ExpandWildcards Type of data stream that wildcard patterns can match. +// Supports comma-separated values, such as `open,hidden`. +// API name: expand_wildcards +func (r *GetDataStreamOptions) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *GetDataStreamOptions { + tmp := []string{} + for _, item := range expandwildcards { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) + + 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. +// API name: master_timeout +func (r *GetDataStreamOptions) MasterTimeout(duration string) *GetDataStreamOptions { + 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 +func (r *GetDataStreamOptions) ErrorTrace(errortrace bool) *GetDataStreamOptions { + 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 *GetDataStreamOptions) FilterPath(filterpaths ...string) *GetDataStreamOptions { + 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 +// `"exists_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 *GetDataStreamOptions) Human(human bool) *GetDataStreamOptions { + 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 *GetDataStreamOptions) Pretty(pretty bool) *GetDataStreamOptions { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/indices/getdatastreamoptions/response.go b/typedapi/indices/getdatastreamoptions/response.go new file mode 100644 index 0000000000..e6deb49654 --- /dev/null +++ b/typedapi/indices/getdatastreamoptions/response.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/907d11a72a6bfd37b777d526880c56202889609e + +package getdatastreamoptions + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package getdatastreamoptions +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_stream_options/IndicesGetDataStreamOptionsResponse.ts#L23-L25 +type Response struct { + DataStreams []types.DataStreamWithOptions `json:"data_streams"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/getdatastreamsettings/get_data_stream_settings.go b/typedapi/indices/getdatastreamsettings/get_data_stream_settings.go new file mode 100644 index 0000000000..7b1201cc35 --- /dev/null +++ b/typedapi/indices/getdatastreamsettings/get_data_stream_settings.go @@ -0,0 +1,359 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +// Get data stream settings. +// +// Get setting information for one or more data streams. +package getdatastreamsettings + +import ( + "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/v9/typedapi/types" +) + +const ( + nameMask = iota + 1 +) + +// 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 GetDataStreamSettings struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + name string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewGetDataStreamSettings type alias for index. +type NewGetDataStreamSettings func(name string) *GetDataStreamSettings + +// NewGetDataStreamSettingsFunc returns a new instance of GetDataStreamSettings with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewGetDataStreamSettingsFunc(tp elastictransport.Interface) NewGetDataStreamSettings { + return func(name string) *GetDataStreamSettings { + n := New(tp) + + n._name(name) + + return n + } +} + +// Get data stream settings. +// +// Get setting information for one or more data streams. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-data-stream-settings +func New(tp elastictransport.Interface) *GetDataStreamSettings { + r := &GetDataStreamSettings{ + 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 *GetDataStreamSettings) 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 == nameMask: + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", r.name) + } + path.WriteString(r.name) + path.WriteString("/") + path.WriteString("_settings") + + 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=9") + } + + 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 GetDataStreamSettings) 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, "indices.get_data_stream_settings") + 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, "indices.get_data_stream_settings") + if reader := instrument.RecordRequestBody(ctx, "indices.get_data_stream_settings", 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", "indices.get_data_stream_settings") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the GetDataStreamSettings 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 getdatastreamsettings.Response +func (r GetDataStreamSettings) 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, "indices.get_data_stream_settings") + 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 +} + +// 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 GetDataStreamSettings) 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, "indices.get_data_stream_settings") + 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 GetDataStreamSettings 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 GetDataStreamSettings headers map. +func (r *GetDataStreamSettings) Header(key, value string) *GetDataStreamSettings { + r.headers.Set(key, value) + + return r +} + +// Name A comma-separated list of data streams or data stream patterns. Supports +// wildcards (`*`). +// API Name: name +func (r *GetDataStreamSettings) _name(name string) *GetDataStreamSettings { + r.paramSet |= nameMask + r.name = name + + 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. +// API name: master_timeout +func (r *GetDataStreamSettings) MasterTimeout(duration string) *GetDataStreamSettings { + 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 +func (r *GetDataStreamSettings) ErrorTrace(errortrace bool) *GetDataStreamSettings { + 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 *GetDataStreamSettings) FilterPath(filterpaths ...string) *GetDataStreamSettings { + 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 +// `"exists_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 *GetDataStreamSettings) Human(human bool) *GetDataStreamSettings { + 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 *GetDataStreamSettings) Pretty(pretty bool) *GetDataStreamSettings { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/indices/getdatastreamsettings/response.go b/typedapi/indices/getdatastreamsettings/response.go new file mode 100644 index 0000000000..13b7aafd7c --- /dev/null +++ b/typedapi/indices/getdatastreamsettings/response.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/907d11a72a6bfd37b777d526880c56202889609e + +package getdatastreamsettings + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package getdatastreamsettings +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L22-L27 +type Response struct { + DataStreams []types.DataStreamSettings `json:"data_streams"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/getfieldmapping/get_field_mapping.go b/typedapi/indices/getfieldmapping/get_field_mapping.go index 9b5add23d7..7d65b3332f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -416,7 +415,7 @@ func (r *GetFieldMapping) FilterPath(filterpaths ...string) *GetFieldMapping { // 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 +// `"exists_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. diff --git a/typedapi/indices/getfieldmapping/response.go b/typedapi/indices/getfieldmapping/response.go index 0ffb9bc864..01625e14b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getfieldmapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getfieldmapping // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_field_mapping/IndicesGetFieldMappingResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 023dead8cd..6df2b30d97 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get index templates. // Get information about one or more index templates. @@ -361,7 +361,7 @@ func (r *GetIndexTemplate) FilterPath(filterpaths ...string) *GetIndexTemplate { // 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 +// `"exists_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. diff --git a/typedapi/indices/getindextemplate/response.go b/typedapi/indices/getindextemplate/response.go index 4d3b03bc6c..4f8f633d4d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getindextemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 43dd8d0ae7..cf013cfdcc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -386,7 +385,7 @@ func (r *GetMapping) FilterPath(filterpaths ...string) *GetMapping { // 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 +// `"exists_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. diff --git a/typedapi/indices/getmapping/response.go b/typedapi/indices/getmapping/response.go index 1b2891dc52..5d915e679e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getmapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmapping // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f84d3bd6a6..ae4f90f6e7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the migration reindexing status. // @@ -335,7 +335,7 @@ func (r *GetMigrateReindexStatus) FilterPath(filterpaths ...string) *GetMigrateR // 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 +// `"exists_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. diff --git a/typedapi/indices/getmigratereindexstatus/response.go b/typedapi/indices/getmigratereindexstatus/response.go index 7b19f101bf..eeb35b539f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getmigratereindexstatus @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package getmigratereindexstatus // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4b1f81a470..6f36056692 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get index settings. // Get setting information for one or more indices. @@ -444,7 +444,7 @@ func (r *GetSettings) FilterPath(filterpaths ...string) *GetSettings { // 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 +// `"exists_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. diff --git a/typedapi/indices/getsettings/response.go b/typedapi/indices/getsettings/response.go index 9762620154..a17159e15a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_settings/IndicesGetSettingsResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6c72686f97..d9841bc58a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e -// 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 @@ -363,7 +363,7 @@ func (r *GetTemplate) FilterPath(filterpaths ...string) *GetTemplate { // 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 +// `"exists_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. diff --git a/typedapi/indices/gettemplate/response.go b/typedapi/indices/gettemplate/response.go index 2cffa9e4ce..b36dfd212f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package gettemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_template/IndicesGetTemplateResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4815abdb4d..708fdf5d96 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Reindex legacy backing indices. // @@ -325,7 +325,7 @@ func (r *MigrateReindex) FilterPath(filterpaths ...string) *MigrateReindex { // 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 +// `"exists_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. diff --git a/typedapi/indices/migratereindex/request.go b/typedapi/indices/migratereindex/request.go index 22961e6eeb..5246cec848 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package migratereindex @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package migratereindex // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L23-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f6c8a224e2..14ca145e6b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package migratereindex // Response holds the response body struct for the package migratereindex // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/migrate_reindex/MigrateReindexResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/migrate_reindex/MigrateReindexResponse.ts#L22-L25 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 87a70a5ff1..0b1e2c5dd2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Convert an index alias to a data stream. // Converts an index alias to a data stream. @@ -365,7 +365,7 @@ func (r *MigrateToDataStream) FilterPath(filterpaths ...string) *MigrateToDataSt // 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 +// `"exists_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. diff --git a/typedapi/indices/migratetodatastream/response.go b/typedapi/indices/migratetodatastream/response.go index cb5c56a2f3..90b91fa9e4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package migratetodatastream // Response holds the response body struct for the package migratetodatastream // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/migrate_to_data_stream/IndicesMigrateToDataStreamResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/migrate_to_data_stream/IndicesMigrateToDataStreamResponse.ts#L22-L25 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 be89aa8a11..700e566e6a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update data streams. // Performs one or more data stream modification actions in a single atomic @@ -318,7 +318,7 @@ func (r *ModifyDataStream) FilterPath(filterpaths ...string) *ModifyDataStream { // 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 +// `"exists_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. diff --git a/typedapi/indices/modifydatastream/request.go b/typedapi/indices/modifydatastream/request.go index 4df266d9b7..6381ba01f9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package modifydatastream @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package modifydatastream // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/modify_data_stream/IndicesModifyDataStreamRequest.ts#L23-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ecac9ce9c3..56024f92a4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package modifydatastream // Response holds the response body struct for the package modifydatastream // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/modify_data_stream/IndicesModifyDataStreamResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/modify_data_stream/IndicesModifyDataStreamResponse.ts#L22-L25 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 e47db027f4..da91f089c3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -466,7 +465,7 @@ func (r *Open) FilterPath(filterpaths ...string) *Open { // 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 +// `"exists_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. diff --git a/typedapi/indices/open/response.go b/typedapi/indices/open/response.go index 9925c613cf..516ccd9f2c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package open // Response holds the response body struct for the package open // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/open/IndicesOpenResponse.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d68775c3e7..e5872aa31a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Promote a data stream. // Promote a data stream from a replicated data stream managed by cross-cluster @@ -368,7 +368,7 @@ func (r *PromoteDataStream) FilterPath(filterpaths ...string) *PromoteDataStream // 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 +// `"exists_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. diff --git a/typedapi/indices/promotedatastream/response.go b/typedapi/indices/promotedatastream/response.go index eaa3483a1d..834e5a1023 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package promotedatastream @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package promotedatastream // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/promote_data_stream/IndicesPromoteDataStreamResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 28b6111c10..b1e36ea28a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update an alias. // Adds a data stream or index to an alias. @@ -398,7 +398,7 @@ func (r *PutAlias) FilterPath(filterpaths ...string) *PutAlias { // 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 +// `"exists_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. diff --git a/typedapi/indices/putalias/request.go b/typedapi/indices/putalias/request.go index 7ee77eb372..a9c4ff4303 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putalias @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putalias // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_alias/IndicesPutAliasRequest.ts#L25-L103 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2a29001bad..4ca706408c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putalias // Response holds the response body struct for the package putalias // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_alias/IndicesPutAliasResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_alias/IndicesPutAliasResponse.ts#L22-L25 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 f23f3c77d3..1923e58d7d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -376,7 +375,7 @@ func (r *PutDataLifecycle) FilterPath(filterpaths ...string) *PutDataLifecycle { // 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 +// `"exists_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. diff --git a/typedapi/indices/putdatalifecycle/request.go b/typedapi/indices/putdatalifecycle/request.go index 306730f3ef..5c97ac5fde 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putdatalifecycle @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putdatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleRequest.ts#L25-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 55580a85f8..655e866ca9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putdatalifecycle // Response holds the response body struct for the package putdatalifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_lifecycle/IndicesPutDataLifecycleResponse.ts#L22-L25 type Response struct { // Acknowledged For a successful response, this value is always true. On failure, an diff --git a/typedapi/indices/putdatastreamoptions/put_data_stream_options.go b/typedapi/indices/putdatastreamoptions/put_data_stream_options.go new file mode 100644 index 0000000000..5221ac417a --- /dev/null +++ b/typedapi/indices/putdatastreamoptions/put_data_stream_options.go @@ -0,0 +1,410 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +// Update data stream options. +// Update the data stream options of the specified data streams. +package putdatastreamoptions + +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/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/expandwildcard" +) + +const ( + nameMask = iota + 1 +) + +// 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 PutDataStreamOptions 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 + + name string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewPutDataStreamOptions type alias for index. +type NewPutDataStreamOptions func(name string) *PutDataStreamOptions + +// NewPutDataStreamOptionsFunc returns a new instance of PutDataStreamOptions with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewPutDataStreamOptionsFunc(tp elastictransport.Interface) NewPutDataStreamOptions { + return func(name string) *PutDataStreamOptions { + n := New(tp) + + n._name(name) + + return n + } +} + +// Update data stream options. +// Update the data stream options of the specified data streams. +// +// https://www.elastic.co/guide/en/elasticsearch/reference/current/index.html +func New(tp elastictransport.Interface) *PutDataStreamOptions { + r := &PutDataStreamOptions{ + 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 *PutDataStreamOptions) Raw(raw io.Reader) *PutDataStreamOptions { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PutDataStreamOptions) Request(req *Request) *PutDataStreamOptions { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *PutDataStreamOptions) 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 PutDataStreamOptions: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == nameMask: + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", r.name) + } + path.WriteString(r.name) + path.WriteString("/") + path.WriteString("_options") + + 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=9") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + 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 PutDataStreamOptions) 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, "indices.put_data_stream_options") + 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, "indices.put_data_stream_options") + if reader := instrument.RecordRequestBody(ctx, "indices.put_data_stream_options", 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", "indices.put_data_stream_options") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the PutDataStreamOptions 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 putdatastreamoptions.Response +func (r PutDataStreamOptions) 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, "indices.put_data_stream_options") + 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 PutDataStreamOptions headers map. +func (r *PutDataStreamOptions) Header(key, value string) *PutDataStreamOptions { + r.headers.Set(key, value) + + return r +} + +// Name Comma-separated list of data streams used to limit the request. +// Supports wildcards (`*`). +// To target all data streams use `*` or `_all`. +// API Name: name +func (r *PutDataStreamOptions) _name(name string) *PutDataStreamOptions { + r.paramSet |= nameMask + r.name = name + + return r +} + +// ExpandWildcards Type of data stream that wildcard patterns can match. +// Supports comma-separated values, such as `open,hidden`. +// API name: expand_wildcards +func (r *PutDataStreamOptions) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *PutDataStreamOptions { + tmp := []string{} + for _, item := range expandwildcards { + tmp = append(tmp, item.String()) + } + r.values.Set("expand_wildcards", strings.Join(tmp, ",")) + + 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. +// API name: master_timeout +func (r *PutDataStreamOptions) MasterTimeout(duration string) *PutDataStreamOptions { + r.values.Set("master_timeout", duration) + + return r +} + +// Timeout Period to wait for a response. +// If no response is received before the timeout expires, the request fails and +// returns an error. +// API name: timeout +func (r *PutDataStreamOptions) Timeout(duration string) *PutDataStreamOptions { + 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 *PutDataStreamOptions) ErrorTrace(errortrace bool) *PutDataStreamOptions { + 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 *PutDataStreamOptions) FilterPath(filterpaths ...string) *PutDataStreamOptions { + 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 +// `"exists_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 *PutDataStreamOptions) Human(human bool) *PutDataStreamOptions { + 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 *PutDataStreamOptions) Pretty(pretty bool) *PutDataStreamOptions { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// If defined, it will update the failure store configuration of every data +// stream resolved by the name expression. +// API name: failure_store +func (r *PutDataStreamOptions) FailureStore(failurestore types.DataStreamFailureStoreVariant) *PutDataStreamOptions { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.FailureStore = failurestore.DataStreamFailureStoreCaster() + + return r +} diff --git a/typedapi/indices/putdatastreamoptions/request.go b/typedapi/indices/putdatastreamoptions/request.go new file mode 100644 index 0000000000..24bb0663f7 --- /dev/null +++ b/typedapi/indices/putdatastreamoptions/request.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/907d11a72a6bfd37b777d526880c56202889609e + +package putdatastreamoptions + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Request holds the request body struct for the package putdatastreamoptions +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_options/IndicesPutDataStreamOptionsRequest.ts#L25-L79 +type Request struct { + + // FailureStore If defined, it will update the failure store configuration of every data + // stream resolved by the name expression. + FailureStore *types.DataStreamFailureStore `json:"failure_store,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 Putdatastreamoptions request: %w", err) + } + + return &req, nil +} diff --git a/typedapi/indices/putdatastreamoptions/response.go b/typedapi/indices/putdatastreamoptions/response.go new file mode 100644 index 0000000000..033a4e99b7 --- /dev/null +++ b/typedapi/indices/putdatastreamoptions/response.go @@ -0,0 +1,37 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package putdatastreamoptions + +// Response holds the response body struct for the package putdatastreamoptions +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_options/IndicesPutDataStreamOptionsResponse.ts#L22-L25 +type Response struct { + + // Acknowledged For a successful response, this value is always true. On failure, an + // exception is returned instead. + Acknowledged bool `json:"acknowledged"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/putdatastreamsettings/put_data_stream_settings.go b/typedapi/indices/putdatastreamsettings/put_data_stream_settings.go new file mode 100644 index 0000000000..a6ccfaa1eb --- /dev/null +++ b/typedapi/indices/putdatastreamsettings/put_data_stream_settings.go @@ -0,0 +1,1130 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +// Update data stream settings. +// +// This API can be used to override settings on specific data streams. These +// overrides will take precedence over what +// is specified in the template that the data stream matches. To prevent your +// data stream from getting into an invalid state, +// only certain settings are allowed. If possible, the setting change is applied +// to all +// backing indices. Otherwise, it will be applied when the data stream is next +// rolled over. +package putdatastreamsettings + +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/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/indexcheckonstartup" +) + +const ( + nameMask = iota + 1 +) + +// 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 PutDataStreamSettings 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 + + name string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewPutDataStreamSettings type alias for index. +type NewPutDataStreamSettings func(name string) *PutDataStreamSettings + +// NewPutDataStreamSettingsFunc returns a new instance of PutDataStreamSettings with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewPutDataStreamSettingsFunc(tp elastictransport.Interface) NewPutDataStreamSettings { + return func(name string) *PutDataStreamSettings { + n := New(tp) + + n._name(name) + + return n + } +} + +// Update data stream settings. +// +// This API can be used to override settings on specific data streams. These +// overrides will take precedence over what +// is specified in the template that the data stream matches. To prevent your +// data stream from getting into an invalid state, +// only certain settings are allowed. If possible, the setting change is applied +// to all +// backing indices. Otherwise, it will be applied when the data stream is next +// rolled over. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-data-stream-settings +func New(tp elastictransport.Interface) *PutDataStreamSettings { + r := &PutDataStreamSettings{ + 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 *PutDataStreamSettings) Raw(raw io.Reader) *PutDataStreamSettings { + r.raw = raw + + return r +} + +// Request allows to set the request property with the appropriate payload. +func (r *PutDataStreamSettings) Request(req *Request) *PutDataStreamSettings { + r.req = req + + return r +} + +// HttpRequest returns the http.Request object built from the +// given parameters. +func (r *PutDataStreamSettings) 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 PutDataStreamSettings: %w", err) + } + + r.buf.Write(data) + + } + + if r.buf.Len() > 0 { + r.raw = r.buf + } + + r.path.Scheme = "http" + + switch { + case r.paramSet == nameMask: + path.WriteString("/") + path.WriteString("_data_stream") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "name", r.name) + } + path.WriteString(r.name) + path.WriteString("/") + path.WriteString("_settings") + + 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("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + 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 PutDataStreamSettings) 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, "indices.put_data_stream_settings") + 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, "indices.put_data_stream_settings") + if reader := instrument.RecordRequestBody(ctx, "indices.put_data_stream_settings", 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", "indices.put_data_stream_settings") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the PutDataStreamSettings 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 putdatastreamsettings.Response +func (r PutDataStreamSettings) 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, "indices.put_data_stream_settings") + 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 PutDataStreamSettings headers map. +func (r *PutDataStreamSettings) Header(key, value string) *PutDataStreamSettings { + r.headers.Set(key, value) + + return r +} + +// Name A comma-separated list of data streams or data stream patterns. +// API Name: name +func (r *PutDataStreamSettings) _name(name string) *PutDataStreamSettings { + r.paramSet |= nameMask + r.name = name + + return r +} + +// DryRun If `true`, the request does not actually change the settings on any data +// streams or indices. Instead, it +// simulates changing the settings and reports back to the user what would have +// happened had these settings +// actually been applied. +// API name: dry_run +func (r *PutDataStreamSettings) DryRun(dryrun bool) *PutDataStreamSettings { + r.values.Set("dry_run", strconv.FormatBool(dryrun)) + + 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. +// API name: master_timeout +func (r *PutDataStreamSettings) MasterTimeout(duration string) *PutDataStreamSettings { + r.values.Set("master_timeout", duration) + + return r +} + +// Timeout The period to wait for a response. If no response is received before the +// +// timeout expires, the request fails and returns an error. +// +// API name: timeout +func (r *PutDataStreamSettings) Timeout(duration string) *PutDataStreamSettings { + 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 *PutDataStreamSettings) ErrorTrace(errortrace bool) *PutDataStreamSettings { + 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 *PutDataStreamSettings) FilterPath(filterpaths ...string) *PutDataStreamSettings { + 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 +// `"exists_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 *PutDataStreamSettings) Human(human bool) *PutDataStreamSettings { + 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 *PutDataStreamSettings) Pretty(pretty bool) *PutDataStreamSettings { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} + +// API name: analysis +func (r *PutDataStreamSettings) Analysis(analysis types.IndexSettingsAnalysisVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Analysis = analysis.IndexSettingsAnalysisCaster() + + return r +} + +// Settings to define analyzers, tokenizers, token filters and character +// filters. +// Refer to the linked documentation for step-by-step examples of updating +// analyzers on existing indices. +// API name: analyze +func (r *PutDataStreamSettings) Analyze(analyze types.SettingsAnalyzeVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Analyze = analyze.SettingsAnalyzeCaster() + + return r +} + +// API name: auto_expand_replicas +func (r *PutDataStreamSettings) AutoExpandReplicas(autoexpandreplicas any) *PutDataStreamSettings { + // 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 *PutDataStreamSettings) Blocks(blocks types.IndexSettingBlocksVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Blocks = blocks.IndexSettingBlocksCaster() + + return r +} + +// API name: check_on_startup +func (r *PutDataStreamSettings) CheckOnStartup(checkonstartup indexcheckonstartup.IndexCheckOnStartup) *PutDataStreamSettings { + // 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 *PutDataStreamSettings) Codec(codec string) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Codec = &codec + + return r +} + +// API name: creation_date +func (r *PutDataStreamSettings) CreationDate(stringifiedepochtimeunitmillis types.StringifiedEpochTimeUnitMillisVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.CreationDate = *stringifiedepochtimeunitmillis.StringifiedEpochTimeUnitMillisCaster() + + return r +} + +// API name: creation_date_string +func (r *PutDataStreamSettings) CreationDateString(datetime types.DateTimeVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.CreationDateString = *datetime.DateTimeCaster() + + return r +} + +// API name: default_pipeline +func (r *PutDataStreamSettings) DefaultPipeline(pipelinename string) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.DefaultPipeline = &pipelinename + + return r +} + +// API name: final_pipeline +func (r *PutDataStreamSettings) FinalPipeline(pipelinename string) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.FinalPipeline = &pipelinename + + return r +} + +// API name: format +func (r *PutDataStreamSettings) Format(format string) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Format = &format + + return r +} + +// API name: gc_deletes +func (r *PutDataStreamSettings) GcDeletes(duration types.DurationVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.GcDeletes = *duration.DurationCaster() + + return r +} + +// API name: hidden +func (r *PutDataStreamSettings) Hidden(hidden string) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Hidden = &hidden + + return r +} + +// API name: highlight +func (r *PutDataStreamSettings) Highlight(highlight types.SettingsHighlightVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Highlight = highlight.SettingsHighlightCaster() + + return r +} + +// API name: index +func (r *PutDataStreamSettings) Index(index types.IndexSettingsVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Index = index.IndexSettingsCaster() + + return r +} + +// API name: IndexSettings +func (r *PutDataStreamSettings) IndexSettings(indexsettings map[string]json.RawMessage) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.IndexSettings = indexsettings + return r +} + +func (r *PutDataStreamSettings) AddIndexSetting(key string, value json.RawMessage) *PutDataStreamSettings { + // 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 = tmp + return r +} + +// Configure indexing back pressure limits. +// API name: indexing_pressure +func (r *PutDataStreamSettings) IndexingPressure(indexingpressure types.IndicesIndexingPressureVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.IndexingPressure = indexingpressure.IndicesIndexingPressureCaster() + + return r +} + +// API name: indexing.slowlog +func (r *PutDataStreamSettings) IndexingSlowlog(indexingslowlog types.IndexingSlowlogSettingsVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.IndexingSlowlog = indexingslowlog.IndexingSlowlogSettingsCaster() + + return r +} + +// API name: lifecycle +func (r *PutDataStreamSettings) Lifecycle(lifecycle types.IndexSettingsLifecycleVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Lifecycle = lifecycle.IndexSettingsLifecycleCaster() + + return r +} + +// API name: load_fixed_bitset_filters_eagerly +func (r *PutDataStreamSettings) LoadFixedBitsetFiltersEagerly(loadfixedbitsetfilterseagerly bool) *PutDataStreamSettings { + // 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. +// API name: mapping +func (r *PutDataStreamSettings) Mapping(mapping types.MappingLimitSettingsVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Mapping = mapping.MappingLimitSettingsCaster() + + return r +} + +// API name: max_docvalue_fields_search +func (r *PutDataStreamSettings) MaxDocvalueFieldsSearch(maxdocvaluefieldssearch int) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.MaxDocvalueFieldsSearch = &maxdocvaluefieldssearch + + return r +} + +// API name: max_inner_result_window +func (r *PutDataStreamSettings) MaxInnerResultWindow(maxinnerresultwindow int) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.MaxInnerResultWindow = &maxinnerresultwindow + + return r +} + +// API name: max_ngram_diff +func (r *PutDataStreamSettings) MaxNgramDiff(maxngramdiff int) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.MaxNgramDiff = &maxngramdiff + + return r +} + +// API name: max_refresh_listeners +func (r *PutDataStreamSettings) MaxRefreshListeners(maxrefreshlisteners int) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.MaxRefreshListeners = &maxrefreshlisteners + + return r +} + +// API name: max_regex_length +func (r *PutDataStreamSettings) MaxRegexLength(maxregexlength int) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.MaxRegexLength = &maxregexlength + + return r +} + +// API name: max_rescore_window +func (r *PutDataStreamSettings) MaxRescoreWindow(maxrescorewindow int) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.MaxRescoreWindow = &maxrescorewindow + + return r +} + +// API name: max_result_window +func (r *PutDataStreamSettings) MaxResultWindow(maxresultwindow int) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.MaxResultWindow = &maxresultwindow + + return r +} + +// API name: max_script_fields +func (r *PutDataStreamSettings) MaxScriptFields(maxscriptfields int) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.MaxScriptFields = &maxscriptfields + + return r +} + +// API name: max_shingle_diff +func (r *PutDataStreamSettings) MaxShingleDiff(maxshinglediff int) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.MaxShingleDiff = &maxshinglediff + + return r +} + +// API name: max_slices_per_scroll +func (r *PutDataStreamSettings) MaxSlicesPerScroll(maxslicesperscroll int) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.MaxSlicesPerScroll = &maxslicesperscroll + + return r +} + +// API name: max_terms_count +func (r *PutDataStreamSettings) MaxTermsCount(maxtermscount int) *PutDataStreamSettings { + // 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 *PutDataStreamSettings) Merge(merge types.MergeVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Merge = merge.MergeCaster() + + return r +} + +// API name: mode +func (r *PutDataStreamSettings) Mode(mode string) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Mode = &mode + + return r +} + +// API name: number_of_replicas +func (r *PutDataStreamSettings) NumberOfReplicas(numberofreplicas string) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.NumberOfReplicas = &numberofreplicas + + return r +} + +// API name: number_of_routing_shards +func (r *PutDataStreamSettings) NumberOfRoutingShards(numberofroutingshards int) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.NumberOfRoutingShards = &numberofroutingshards + + return r +} + +// API name: number_of_shards +func (r *PutDataStreamSettings) NumberOfShards(numberofshards string) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.NumberOfShards = &numberofshards + + return r +} + +// API name: priority +func (r *PutDataStreamSettings) Priority(priority string) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Priority = &priority + + return r +} + +// API name: provided_name +func (r *PutDataStreamSettings) ProvidedName(name string) *PutDataStreamSettings { + // 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 *PutDataStreamSettings) Queries(queries types.QueriesVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Queries = queries.QueriesCaster() + + return r +} + +// API name: query_string +func (r *PutDataStreamSettings) QueryString(querystring types.SettingsQueryStringVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.QueryString = querystring.SettingsQueryStringCaster() + + return r +} + +// API name: refresh_interval +func (r *PutDataStreamSettings) RefreshInterval(duration types.DurationVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.RefreshInterval = *duration.DurationCaster() + + return r +} + +// API name: routing +func (r *PutDataStreamSettings) Routing(routing types.IndexRoutingVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Routing = routing.IndexRoutingCaster() + + return r +} + +// API name: routing_partition_size +func (r *PutDataStreamSettings) RoutingPartitionSize(stringifiedinteger types.StringifiedintegerVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.RoutingPartitionSize = *stringifiedinteger.StringifiedintegerCaster() + + return r +} + +// API name: routing_path +func (r *PutDataStreamSettings) RoutingPath(routingpaths ...string) *PutDataStreamSettings { + // 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 *PutDataStreamSettings) Search(search types.SettingsSearchVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Search = search.SettingsSearchCaster() + + return r +} + +// API name: settings +func (r *PutDataStreamSettings) Settings(settings types.IndexSettingsVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Settings = settings.IndexSettingsCaster() + + return r +} + +// Configure custom similarity settings to customize how search results are +// scored. +// API name: similarity +func (r *PutDataStreamSettings) Similarity(similarity map[string]types.SettingsSimilarity) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + r.req.Similarity = similarity + return r +} + +func (r *PutDataStreamSettings) AddSimilarity(key string, value types.SettingsSimilarityVariant) *PutDataStreamSettings { + // 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 = tmp + return r +} + +// API name: soft_deletes +func (r *PutDataStreamSettings) SoftDeletes(softdeletes types.SoftDeletesVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.SoftDeletes = softdeletes.SoftDeletesCaster() + + return r +} + +// API name: sort +func (r *PutDataStreamSettings) Sort(sort types.IndexSegmentSortVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Sort = sort.IndexSegmentSortCaster() + + return r +} + +// The store module allows you to control how index data is stored and accessed +// on disk. +// API name: store +func (r *PutDataStreamSettings) Store(store types.StorageVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Store = store.StorageCaster() + + return r +} + +// API name: time_series +func (r *PutDataStreamSettings) TimeSeries(timeseries types.IndexSettingsTimeSeriesVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.TimeSeries = timeseries.IndexSettingsTimeSeriesCaster() + + return r +} + +// API name: top_metrics_max_size +func (r *PutDataStreamSettings) TopMetricsMaxSize(topmetricsmaxsize int) *PutDataStreamSettings { + // 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 *PutDataStreamSettings) Translog(translog types.TranslogVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Translog = translog.TranslogCaster() + + return r +} + +// API name: uuid +func (r *PutDataStreamSettings) Uuid(uuid string) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Uuid = &uuid + + return r +} + +// API name: verified_before_close +func (r *PutDataStreamSettings) VerifiedBeforeClose(verifiedbeforeclose string) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.VerifiedBeforeClose = &verifiedbeforeclose + + return r +} + +// API name: version +func (r *PutDataStreamSettings) Version(version types.IndexVersioningVariant) *PutDataStreamSettings { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.Version = version.IndexVersioningCaster() + + return r +} diff --git a/typedapi/indices/putdatastreamsettings/request.go b/typedapi/indices/putdatastreamsettings/request.go new file mode 100644 index 0000000000..34c7d039a9 --- /dev/null +++ b/typedapi/indices/putdatastreamsettings/request.go @@ -0,0 +1,37 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package putdatastreamsettings + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Request holds the request body struct for the package putdatastreamsettings +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsRequest.ts#L25-L77 +type Request = types.IndexSettings + +// NewRequest returns a Request +func NewRequest() *Request { + r := types.NewIndexSettings() + + return r +} diff --git a/typedapi/indices/putdatastreamsettings/response.go b/typedapi/indices/putdatastreamsettings/response.go new file mode 100644 index 0000000000..4ad58bcd6a --- /dev/null +++ b/typedapi/indices/putdatastreamsettings/response.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/907d11a72a6bfd37b777d526880c56202889609e + +package putdatastreamsettings + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package putdatastreamsettings +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L23-L28 +type Response struct { + DataStreams []types.UpdatedDataStreamSettings `json:"data_streams"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/putindextemplate/put_index_template.go b/typedapi/indices/putindextemplate/put_index_template.go index 9bd0ccd4bb..857b4f4ee2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update an index template. // Index templates define settings, mappings, and aliases that can be applied @@ -451,7 +451,7 @@ func (r *PutIndexTemplate) FilterPath(filterpaths ...string) *PutIndexTemplate { // 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 +// `"exists_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. diff --git a/typedapi/indices/putindextemplate/request.go b/typedapi/indices/putindextemplate/request.go index d34d96cfbb..3970482cb0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putindextemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L37-L157 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5b3b394be1..a5d290ec3b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putindextemplate // Response holds the response body struct for the package putindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_index_template/IndicesPutIndexTemplateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_index_template/IndicesPutIndexTemplateResponse.ts#L22-L25 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 902b87128a..b50128ff92 100644 --- a/typedapi/indices/putmapping/put_mapping.go +++ b/typedapi/indices/putmapping/put_mapping.go @@ -16,47 +16,24 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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. +// You can use the update mapping API to: // -// **Add multi-fields to an existing field** +// - Add a new field to an existing index +// - Update mappings for multiple indices in a single request +// - Add new properties to an object field +// - Enable multi-fields for an existing field +// - Update supported mapping parameters +// - Change a field's mapping using reindexing +// - Rename a field using a field alias // -// 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. +// Learn how to use the update mapping API with practical examples in the +// [Update mapping API +// examples](https://www.elastic.co/docs//manage-data/data-store/mapping/update-mappings-examples) +// guide. package putmapping import ( @@ -123,43 +100,20 @@ func NewPutMappingFunc(tp elastictransport.Interface) NewPutMapping { // 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. +// You can use the update mapping API to: // -// **Rename a field** +// - Add a new field to an existing index +// - Update mappings for multiple indices in a single request +// - Add new properties to an object field +// - Enable multi-fields for an existing field +// - Update supported mapping parameters +// - Change a field's mapping using reindexing +// - Rename a field using a field alias // -// Renaming a field would invalidate data already indexed under the old field -// name. -// Instead, add an alias field to create an alternate field name. +// Learn how to use the update mapping API with practical examples in the +// [Update mapping API +// examples](https://www.elastic.co/docs//manage-data/data-store/mapping/update-mappings-examples) +// guide. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-mapping func New(tp elastictransport.Interface) *PutMapping { @@ -404,7 +358,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{} @@ -478,7 +431,7 @@ func (r *PutMapping) FilterPath(filterpaths ...string) *PutMapping { // 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 +// `"exists_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. diff --git a/typedapi/indices/putmapping/request.go b/typedapi/indices/putmapping/request.go index fbedd711a2..bd8d329fd8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putmapping @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package putmapping // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_mapping/IndicesPutMappingRequest.ts#L41-L181 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_mapping/IndicesPutMappingRequest.ts#L41-L164 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 d6c12d5aeb..3db956b619 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putmapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putmapping // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_mapping/IndicesPutMappingResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_mapping/IndicesPutMappingResponse.ts#L22-L25 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 c5d0b459c1..f891a68a7a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update index settings. // Changes dynamic index settings in real time. @@ -25,10 +25,61 @@ // // 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`. // +// For performance optimization during bulk indexing, you can disable the +// refresh interval. +// Refer to [disable refresh +// interval](https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval) +// for an example. +// 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. @@ -43,6 +94,9 @@ // existing data. // To change the analyzer for existing backing indices, you must create a new // data stream and reindex your data into it. +// Refer to [updating analyzers on existing +// indices](https://www.elastic.co/docs/manage-data/data-store/text-analysis/specify-an-analyzer#update-analyzers-on-existing-indices) +// for step-by-step examples. package putsettings import ( @@ -112,10 +166,61 @@ 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`. // +// For performance optimization during bulk indexing, you can disable the +// refresh interval. +// Refer to [disable refresh +// interval](https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval) +// for an example. +// 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. @@ -130,6 +235,9 @@ func NewPutSettingsFunc(tp elastictransport.Interface) NewPutSettings { // existing data. // To change the analyzer for existing backing indices, you must create a new // data stream and reindex your data into it. +// Refer to [updating analyzers on existing +// indices](https://www.elastic.co/docs/manage-data/data-store/text-analysis/specify-an-analyzer#update-analyzers-on-existing-indices) +// for step-by-step examples. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings func New(tp elastictransport.Interface) *PutSettings { @@ -472,7 +580,7 @@ func (r *PutSettings) FilterPath(filterpaths ...string) *PutSettings { // 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 +// `"exists_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. @@ -506,6 +614,8 @@ func (r *PutSettings) Analysis(analysis types.IndexSettingsAnalysisVariant) *Put // Settings to define analyzers, tokenizers, token filters and character // filters. +// Refer to the linked documentation for step-by-step examples of updating +// analyzers on existing indices. // API name: analyze func (r *PutSettings) Analyze(analyze types.SettingsAnalyzeVariant) *PutSettings { // Initialize the request if it is not already initialized @@ -619,7 +729,7 @@ func (r *PutSettings) Format(format string) *PutSettings { r.req = NewRequest() } - r.req.Format = format + r.req.Format = &format return r } @@ -643,7 +753,7 @@ func (r *PutSettings) Hidden(hidden string) *PutSettings { r.req = NewRequest() } - r.req.Hidden = hidden + r.req.Hidden = &hidden return r } @@ -926,7 +1036,7 @@ func (r *PutSettings) NumberOfReplicas(numberofreplicas string) *PutSettings { r.req = NewRequest() } - r.req.NumberOfReplicas = numberofreplicas + r.req.NumberOfReplicas = &numberofreplicas return r } @@ -950,7 +1060,7 @@ func (r *PutSettings) NumberOfShards(numberofshards string) *PutSettings { r.req = NewRequest() } - r.req.NumberOfShards = numberofshards + r.req.NumberOfShards = &numberofshards return r } @@ -962,7 +1072,7 @@ func (r *PutSettings) Priority(priority string) *PutSettings { r.req = NewRequest() } - r.req.Priority = priority + r.req.Priority = &priority return r } @@ -1199,7 +1309,7 @@ func (r *PutSettings) VerifiedBeforeClose(verifiedbeforeclose string) *PutSettin r.req = NewRequest() } - r.req.VerifiedBeforeClose = verifiedbeforeclose + r.req.VerifiedBeforeClose = &verifiedbeforeclose return r } diff --git a/typedapi/indices/putsettings/request.go b/typedapi/indices/putsettings/request.go index f43cbc2b7e..7a04a6eacf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putsettings @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_settings/IndicesPutSettingsRequest.ts#L25-L125 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_settings/IndicesPutSettingsRequest.ts#L25-L165 type Request = types.IndexSettings // NewRequest returns a Request diff --git a/typedapi/indices/putsettings/response.go b/typedapi/indices/putsettings/response.go index cbfa230776..05c1dc4787 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putsettings // Response holds the response body struct for the package putsettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_settings/IndicesPutSettingsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_settings/IndicesPutSettingsResponse.ts#L22-L25 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 c7c1acec50..36de0cf09c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e -// 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 @@ -422,7 +422,7 @@ func (r *PutTemplate) FilterPath(filterpaths ...string) *PutTemplate { // 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 +// `"exists_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. diff --git a/typedapi/indices/puttemplate/request.go b/typedapi/indices/puttemplate/request.go index 2a1262b57f..d476017f5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puttemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package puttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_template/IndicesPutTemplateRequest.ts#L29-L123 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_template/IndicesPutTemplateRequest.ts#L29-L124 type Request struct { // Aliases Aliases for the index. diff --git a/typedapi/indices/puttemplate/response.go b/typedapi/indices/puttemplate/response.go index d07211abd2..a57613007d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puttemplate // Response holds the response body struct for the package puttemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_template/IndicesPutTemplateResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_template/IndicesPutTemplateResponse.ts#L22-L25 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 5b4c7fab6b..b27b112524 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/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 @@ -414,7 +449,7 @@ func (r *Recovery) FilterPath(filterpaths ...string) *Recovery { // 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 +// `"exists_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. diff --git a/typedapi/indices/recovery/response.go b/typedapi/indices/recovery/response.go index c2a92c0f18..d49f433f5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package recovery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package recovery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/recovery/IndicesRecoveryResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9baa04124b..fed0f96f5f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -412,7 +411,7 @@ func (r *Refresh) FilterPath(filterpaths ...string) *Refresh { // 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 +// `"exists_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. diff --git a/typedapi/indices/refresh/response.go b/typedapi/indices/refresh/response.go index 1db99b5859..a02fbcc968 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package refresh @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package refresh // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/refresh/IndicesRefreshResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/refresh/IndicesRefreshResponse.ts#L22-L25 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 c03935f6af..312bb29c19 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Reload search analyzers. // Reload an index's search analyzers and their resources. @@ -407,7 +407,7 @@ func (r *ReloadSearchAnalyzers) FilterPath(filterpaths ...string) *ReloadSearchA // 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 +// `"exists_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. diff --git a/typedapi/indices/reloadsearchanalyzers/response.go b/typedapi/indices/reloadsearchanalyzers/response.go index 1c93246480..2ad5cc1818 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package reloadsearchanalyzers @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reloadsearchanalyzers // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/reload_search_analyzers/ReloadSearchAnalyzersResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/reload_search_analyzers/ReloadSearchAnalyzersResponse.ts#L22-L25 type Response struct { ReloadDetails []types.ReloadDetails `json:"reload_details"` Shards_ types.ShardStatistics `json:"_shards"` diff --git a/typedapi/indices/removeblock/remove_block.go b/typedapi/indices/removeblock/remove_block.go new file mode 100644 index 0000000000..6a73449fd6 --- /dev/null +++ b/typedapi/indices/removeblock/remove_block.go @@ -0,0 +1,439 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +// Remove an index block. +// +// Remove an index block from an index. +// Index blocks limit the operations allowed on an index by blocking specific +// operation types. +package removeblock + +import ( + "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/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/expandwildcard" +) + +const ( + indexMask = iota + 1 + + blockMask +) + +// 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 RemoveBlock struct { + transport elastictransport.Interface + + headers http.Header + values url.Values + path url.URL + + raw io.Reader + + paramSet int + + index string + block string + + spanStarted bool + + instrument elastictransport.Instrumentation +} + +// NewRemoveBlock type alias for index. +type NewRemoveBlock func(index, block string) *RemoveBlock + +// NewRemoveBlockFunc returns a new instance of RemoveBlock with the provided transport. +// Used in the index of the library this allows to retrieve every apis in once place. +func NewRemoveBlockFunc(tp elastictransport.Interface) NewRemoveBlock { + return func(index, block string) *RemoveBlock { + n := New(tp) + + n._index(index) + + n._block(block) + + return n + } +} + +// Remove an index block. +// +// Remove an index block from an index. +// Index blocks limit the operations allowed on an index by blocking specific +// operation types. +// +// https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-remove-block +func New(tp elastictransport.Interface) *RemoveBlock { + r := &RemoveBlock{ + 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 *RemoveBlock) 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 == indexMask|blockMask: + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "index", r.index) + } + path.WriteString(r.index) + path.WriteString("/") + path.WriteString("_block") + path.WriteString("/") + + if instrument, ok := r.instrument.(elastictransport.Instrumentation); ok { + instrument.RecordPathPart(ctx, "block", r.block) + } + path.WriteString(r.block) + + method = http.MethodDelete + } + + 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=9") + } + + 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 RemoveBlock) 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, "indices.remove_block") + 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, "indices.remove_block") + if reader := instrument.RecordRequestBody(ctx, "indices.remove_block", 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", "indices.remove_block") + } + if err != nil { + localErr := fmt.Errorf("an error happened during the RemoveBlock 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 removeblock.Response +func (r RemoveBlock) 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, "indices.remove_block") + 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 +} + +// 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 RemoveBlock) 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, "indices.remove_block") + 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 RemoveBlock 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 RemoveBlock headers map. +func (r *RemoveBlock) Header(key, value string) *RemoveBlock { + r.headers.Set(key, value) + + return r +} + +// Index A comma-separated list or wildcard expression of index names used to limit +// the request. +// By default, you must explicitly name the indices you are removing blocks +// from. +// To allow the removal of blocks from indices with `_all`, `*`, or other +// wildcard expressions, change the `action.destructive_requires_name` setting +// to `false`. +// You can update this setting in the `elasticsearch.yml` file or by using the +// cluster update settings API. +// API Name: index +func (r *RemoveBlock) _index(index string) *RemoveBlock { + r.paramSet |= indexMask + r.index = index + + return r +} + +// Block The block type to remove from the index. +// API Name: block +func (r *RemoveBlock) _block(block string) *RemoveBlock { + r.paramSet |= blockMask + r.block = block + + 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. +// For example, a request targeting `foo*,bar*` returns an error if an index +// starts with `foo` but no index starts with `bar`. +// API name: allow_no_indices +func (r *RemoveBlock) AllowNoIndices(allownoindices bool) *RemoveBlock { + r.values.Set("allow_no_indices", strconv.FormatBool(allownoindices)) + + return r +} + +// 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`. +// API name: expand_wildcards +func (r *RemoveBlock) ExpandWildcards(expandwildcards ...expandwildcard.ExpandWildcard) *RemoveBlock { + 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 *RemoveBlock) IgnoreUnavailable(ignoreunavailable bool) *RemoveBlock { + r.values.Set("ignore_unavailable", strconv.FormatBool(ignoreunavailable)) + + return r +} + +// MasterTimeout The period to wait for the master node. +// If the master node is not available before the timeout expires, the request +// fails and returns an error. +// It can also be set to `-1` to indicate that the request should never timeout. +// API name: master_timeout +func (r *RemoveBlock) MasterTimeout(duration string) *RemoveBlock { + r.values.Set("master_timeout", duration) + + return r +} + +// Timeout The period to wait for a response from all relevant nodes in the cluster +// after updating the cluster metadata. +// If no response is received before the timeout expires, the cluster metadata +// update still applies but the response will indicate that it was not +// completely acknowledged. +// It can also be set to `-1` to indicate that the request should never timeout. +// API name: timeout +func (r *RemoveBlock) Timeout(duration string) *RemoveBlock { + 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 *RemoveBlock) ErrorTrace(errortrace bool) *RemoveBlock { + 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 *RemoveBlock) FilterPath(filterpaths ...string) *RemoveBlock { + 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 +// `"exists_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 *RemoveBlock) Human(human bool) *RemoveBlock { + 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 *RemoveBlock) Pretty(pretty bool) *RemoveBlock { + r.values.Set("pretty", strconv.FormatBool(pretty)) + + return r +} diff --git a/typedapi/indices/removeblock/response.go b/typedapi/indices/removeblock/response.go new file mode 100644 index 0000000000..abcebf9cce --- /dev/null +++ b/typedapi/indices/removeblock/response.go @@ -0,0 +1,39 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package removeblock + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types" +) + +// Response holds the response body struct for the package removeblock +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/remove_block/IndicesRemoveBlockResponse.ts#L23-L28 +type Response struct { + Acknowledged bool `json:"acknowledged"` + Indices []types.RemoveIndicesBlockStatus `json:"indices"` +} + +// NewResponse returns a Response +func NewResponse() *Response { + r := &Response{} + return r +} diff --git a/typedapi/indices/resolvecluster/resolve_cluster.go b/typedapi/indices/resolvecluster/resolve_cluster.go index be697c0f08..b53b35932e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 @@ -577,7 +576,7 @@ func (r *ResolveCluster) FilterPath(filterpaths ...string) *ResolveCluster { // 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 +// `"exists_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. diff --git a/typedapi/indices/resolvecluster/response.go b/typedapi/indices/resolvecluster/response.go index ffb487a216..6001c48f64 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package resolvecluster @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package resolvecluster // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/resolve_cluster/ResolveClusterResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 71162ae986..821f7e3f13 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -370,7 +369,7 @@ func (r *ResolveIndex) FilterPath(filterpaths ...string) *ResolveIndex { // 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 +// `"exists_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. diff --git a/typedapi/indices/resolveindex/response.go b/typedapi/indices/resolveindex/response.go index 209aec755e..04c8a02e59 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package resolveindex @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package resolveindex // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/resolve_index/ResolveIndexResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5645babc5f..341da3ab25 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package rollover @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package rollover // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/rollover/IndicesRolloverRequest.ts#L29-L153 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fc05a4d0e2..c148704729 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package rollover // Response holds the response body struct for the package rollover // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/rollover/IndicesRolloverResponse.ts#L22-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 814cfb6190..4d29fac83c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Roll over to a new index. // TIP: It is recommended to use the index lifecycle rollover action to automate @@ -524,7 +524,7 @@ func (r *Rollover) FilterPath(filterpaths ...string) *Rollover { // 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 +// `"exists_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. diff --git a/typedapi/indices/segments/response.go b/typedapi/indices/segments/response.go index 949b9ec6a8..19427b4783 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package segments @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package segments // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/segments/IndicesSegmentsResponse.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5405c3c08f..82d17637c9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -370,7 +369,7 @@ func (r *Segments) FilterPath(filterpaths ...string) *Segments { // 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 +// `"exists_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. diff --git a/typedapi/indices/shardstores/response.go b/typedapi/indices/shardstores/response.go index 2ec72328b4..251a94cfca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package shardstores @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package shardstores // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/shard_stores/IndicesShardStoresResponse.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8e4484b608..10429bc865 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get index shard stores. // Get store information about replica shards in one or more indices. @@ -401,7 +401,7 @@ func (r *ShardStores) FilterPath(filterpaths ...string) *ShardStores { // 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 +// `"exists_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. diff --git a/typedapi/indices/shrink/request.go b/typedapi/indices/shrink/request.go index 581daab4c6..9d33f126ff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package shrink @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package shrink // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/shrink/IndicesShrinkRequest.ts#L27-L113 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dd9eb39e9f..6212420c7b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package shrink // Response holds the response body struct for the package shrink // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/shrink/IndicesShrinkResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8049ed5af6..f42e4ae5b6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Shrink an index. // Shrink an index into a new index with fewer primary shards. @@ -496,7 +496,7 @@ func (r *Shrink) FilterPath(filterpaths ...string) *Shrink { // 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 +// `"exists_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. diff --git a/typedapi/indices/simulateindextemplate/response.go b/typedapi/indices/simulateindextemplate/response.go index cfa9b3f33b..4387ecf878 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package simulateindextemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package simulateindextemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/simulate_index_template/IndicesSimulateIndexTemplateResponse.ts#L25-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bb4a9695c9..2d549345ce 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Simulate an index. // Get the index configuration that would be applied to the specified index from @@ -368,7 +368,7 @@ func (r *SimulateIndexTemplate) FilterPath(filterpaths ...string) *SimulateIndex // 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 +// `"exists_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. diff --git a/typedapi/indices/simulatetemplate/request.go b/typedapi/indices/simulatetemplate/request.go index 984d7aa5bc..1ca1f71520 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package simulatetemplate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package simulatetemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L135 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d032901741..01f00855d8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package simulatetemplate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package simulatetemplate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L26-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 757a1fa7aa..62f1b15ffd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Simulate an index template. // Get the index configuration that would be applied by a particular index @@ -385,7 +385,7 @@ func (r *SimulateTemplate) FilterPath(filterpaths ...string) *SimulateTemplate { // 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 +// `"exists_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. diff --git a/typedapi/indices/split/request.go b/typedapi/indices/split/request.go index 8082bb3898..8a8d5da6e7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package split @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package split // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/split/IndicesSplitRequest.ts#L27-L113 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 14176edfb5..2ff6d7afd9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package split // Response holds the response body struct for the package split // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/split/IndicesSplitResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 44c066983b..48f25c746b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Split an index. // Split an index into a new index with more primary shards. @@ -480,7 +480,7 @@ func (r *Split) FilterPath(filterpaths ...string) *Split { // 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 +// `"exists_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. diff --git a/typedapi/indices/stats/response.go b/typedapi/indices/stats/response.go index 3f2995357f..23f39d2eb6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/IndicesStatsResponse.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 73c6f8e1e4..1b4888cdd2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get index statistics. // For data streams, the API retrieves statistics for the stream's backing @@ -485,7 +485,7 @@ func (r *Stats) FilterPath(filterpaths ...string) *Stats { // 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 +// `"exists_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. diff --git a/typedapi/indices/updatealiases/request.go b/typedapi/indices/updatealiases/request.go index 47a9b53803..1e38c601bc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatealiases @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatealiases // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/update_aliases/IndicesUpdateAliasesRequest.ts#L24-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f970ab23b5..9445b95f4c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatealiases // Response holds the response body struct for the package updatealiases // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/update_aliases/IndicesUpdateAliasesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/update_aliases/IndicesUpdateAliasesResponse.ts#L22-L25 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 1b2b01b735..21f8a820e8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update an alias. // Adds a data stream or index to an alias. @@ -334,7 +334,7 @@ func (r *UpdateAliases) FilterPath(filterpaths ...string) *UpdateAliases { // 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 +// `"exists_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. diff --git a/typedapi/indices/validatequery/request.go b/typedapi/indices/validatequery/request.go index 4e3b15afb4..4bd5012e9c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package validatequery @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package validatequery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/validate_query/IndicesValidateQueryRequest.ts#L25-L123 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 75b4b1a6eb..e8348c42c3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package validatequery @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package validatequery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 395acbb395..eec10eede1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -464,7 +463,7 @@ func (r *ValidateQuery) FilterPath(filterpaths ...string) *ValidateQuery { // 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 +// `"exists_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. diff --git a/typedapi/inference/chatcompletionunified/chat_completion_unified.go b/typedapi/inference/chatcompletionunified/chat_completion_unified.go index 0996bfd525..5b78fa2c5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-unified-inference func New(tp elastictransport.Interface) *ChatCompletionUnified { r := &ChatCompletionUnified{ @@ -347,7 +377,7 @@ func (r *ChatCompletionUnified) FilterPath(filterpaths ...string) *ChatCompletio // 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 +// `"exists_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. @@ -382,6 +412,10 @@ func (r *ChatCompletionUnified) MaxCompletionTokens(maxcompletiontokens int64) * } // 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 @@ -439,6 +473,23 @@ func (r *ChatCompletionUnified) Temperature(temperature float32) *ChatCompletion } // 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 @@ -452,6 +503,33 @@ func (r *ChatCompletionUnified) ToolChoice(completiontooltype types.CompletionTo } // 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 diff --git a/typedapi/inference/chatcompletionunified/request.go b/typedapi/inference/chatcompletionunified/request.go index 8770ad4009..2516a4cb9f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package chatcompletionunified @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package chatcompletionunified // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/chat_completion_unified/UnifiedRequest.ts#L24-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c8b0078d19..d1a04b7918 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package chatcompletionunified // Response holds the response body struct for the package chatcompletionunified // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/chat_completion_unified/UnifiedResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/chat_completion_unified/UnifiedResponse.ts#L22-L25 type Response = []byte diff --git a/typedapi/inference/completion/completion.go b/typedapi/inference/completion/completion.go index f3342aa9fc..86dec8342f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Perform completion inference on the service package completion @@ -345,7 +345,7 @@ func (r *Completion) FilterPath(filterpaths ...string) *Completion { // 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 +// `"exists_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. diff --git a/typedapi/inference/completion/request.go b/typedapi/inference/completion/request.go index 5f02d25b9e..316a39efbd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package completion @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package completion // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/completion/CompletionRequest.ts#L25-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2cd8f54721..9a5e35ec37 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package completion @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package completion // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/completion/CompletionResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/completion/CompletionResponse.ts#L22-L25 type Response []types.CompletionResult diff --git a/typedapi/inference/delete/delete.go b/typedapi/inference/delete/delete.go index 0d545cdd76..952813ed9a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete an inference endpoint package delete @@ -368,7 +368,7 @@ func (r *Delete) FilterPath(filterpaths ...string) *Delete { // 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 +// `"exists_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. diff --git a/typedapi/inference/delete/response.go b/typedapi/inference/delete/response.go index 9db5f019d5..c9a3d8d349 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/delete/DeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/delete/DeleteResponse.ts#L22-L25 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 634047d136..1aa1f30aef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get an inference endpoint package get @@ -353,7 +353,7 @@ func (r *Get) FilterPath(filterpaths ...string) *Get { // 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 +// `"exists_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. diff --git a/typedapi/inference/get/response.go b/typedapi/inference/get/response.go index 76c87aeea1..8bb06126d9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/get/GetResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7caf873ca0..3ecdcaa664 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Perform inference on the service. // @@ -410,7 +410,7 @@ func (r *Inference) FilterPath(filterpaths ...string) *Inference { // 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 +// `"exists_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. @@ -448,6 +448,34 @@ func (r *Inference) Input(inputs ...string) *Inference { return r } +// 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 { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.InputType = &inputtype + + return r +} + // The query input, which is required only for the `rerank` task. // It is not required for other tasks. // API name: query diff --git a/typedapi/inference/inference/request.go b/typedapi/inference/inference/request.go index 2ab0654dc4..927c8e5c01 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package inference @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package inference // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/inference/InferenceRequest.ts#L26-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3325e7c9aa..1cd85f8c68 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package inference @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package inference // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/inference/InferenceResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d33314884e..2d81f4e084 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put 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 @@ -402,7 +442,7 @@ func (r *Put) FilterPath(filterpaths ...string) *Put { // 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 +// `"exists_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. diff --git a/typedapi/inference/put/request.go b/typedapi/inference/put/request.go index d405b5d9eb..6515b5b4c4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package put @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put/PutRequest.ts#L25-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7e67192abd..d32644bf9e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package put @@ -29,7 +29,7 @@ import ( // Response holds the response body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put/PutResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put/PutResponse.ts#L22-L25 type Response struct { // ChunkingSettings Chunking configuration object diff --git a/typedapi/inference/putalibabacloud/put_alibabacloud.go b/typedapi/inference/putalibabacloud/put_alibabacloud.go index 970be0f5a8..25e5383777 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-alibabacloud 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 @@ -382,7 +371,7 @@ func (r *PutAlibabacloud) FilterPath(filterpaths ...string) *PutAlibabacloud { // 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 +// `"exists_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. diff --git a/typedapi/inference/putalibabacloud/request.go b/typedapi/inference/putalibabacloud/request.go index c7ad3eafb0..3e6d1b3cbe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putalibabacloud @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putalibabacloud // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_alibabacloud/PutAlibabaCloudRequest.ts#L30-L83 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9c78606837..22687dfdac 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putalibabacloud @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypealibabacloudai" ) // Response holds the response body struct for the package putalibabacloud // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_alibabacloud/PutAlibabaCloudResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_alibabacloud/PutAlibabaCloudResponse.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 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 bdf20aa00c..71703ac2ec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-amazonbedrock 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 @@ -398,7 +387,7 @@ func (r *PutAmazonbedrock) FilterPath(filterpaths ...string) *PutAmazonbedrock { // 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 +// `"exists_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. diff --git a/typedapi/inference/putamazonbedrock/request.go b/typedapi/inference/putamazonbedrock/request.go index 570ec404af..ca09707a40 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putamazonbedrock @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putamazonbedrock // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_amazonbedrock/PutAmazonBedrockRequest.ts#L30-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7453d6a57e..5b35cd0a5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putamazonbedrock @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypeamazonbedrock" ) // Response holds the response body struct for the package putamazonbedrock // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_amazonbedrock/PutAmazonBedrockResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_amazonbedrock/PutAmazonBedrockResponse.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 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..262094745b --- /dev/null +++ b/typedapi/inference/putamazonsagemaker/put_amazonsagemaker.go @@ -0,0 +1,447 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +// 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/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/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=9") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + 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 +// `"exists_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 +} + +// The chunking configuration object. +// API name: chunking_settings +func (r *PutAmazonsagemaker) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutAmazonsagemaker { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + + return r +} + +// 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 { + // 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 the `amazon_sagemaker` service and +// `service_settings.api` you specified. +// API name: service_settings +func (r *PutAmazonsagemaker) ServiceSettings(servicesettings types.AmazonSageMakerServiceSettingsVariant) *PutAmazonsagemaker { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ServiceSettings = *servicesettings.AmazonSageMakerServiceSettingsCaster() + + return r +} + +// 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.AmazonSageMakerTaskSettingsVariant) *PutAmazonsagemaker { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.TaskSettings = tasksettings.AmazonSageMakerTaskSettingsCaster() + + return r +} diff --git a/typedapi/inference/putamazonsagemaker/request.go b/typedapi/inference/putamazonsagemaker/request.go new file mode 100644 index 0000000000..6711f0ac8c --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package putamazonsagemaker + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/amazonsagemakerservicetype" +) + +// Request holds the request body struct for the package putamazonsagemaker +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..99b3d414f4 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package putamazonsagemaker + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypeamazonsagemaker" +) + +// Response holds the response body struct for the package putamazonsagemaker +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ce1e7f50ea..714d658dfc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-anthropic 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 @@ -383,7 +372,7 @@ func (r *PutAnthropic) FilterPath(filterpaths ...string) *PutAnthropic { // 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 +// `"exists_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. diff --git a/typedapi/inference/putanthropic/request.go b/typedapi/inference/putanthropic/request.go index d7ee93db7b..a2f9b0dac8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putanthropic @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putanthropic // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_anthropic/PutAnthropicRequest.ts#L30-L84 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d7ae45fe58..58169eb05c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putanthropic @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypeanthropic" ) // Response holds the response body struct for the package putanthropic // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_anthropic/PutAnthropicResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_anthropic/PutAnthropicResponse.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 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 86ff6b2f9b..45e36cecc6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-azureaistudio 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 @@ -382,7 +371,7 @@ func (r *PutAzureaistudio) FilterPath(filterpaths ...string) *PutAzureaistudio { // 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 +// `"exists_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. diff --git a/typedapi/inference/putazureaistudio/request.go b/typedapi/inference/putazureaistudio/request.go index 5b57ae688c..ce483c04b3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putazureaistudio @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putazureaistudio // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_azureaistudio/PutAzureAiStudioRequest.ts#L30-L83 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 de101dfe9d..f23f1a2eec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putazureaistudio @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypeazureaistudio" ) // Response holds the response body struct for the package putazureaistudio // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_azureaistudio/PutAzureAiStudioResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_azureaistudio/PutAzureAiStudioResponse.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 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 9db212ce58..ee6fdbe479 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-azureopenai 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 @@ -408,7 +397,7 @@ func (r *PutAzureopenai) FilterPath(filterpaths ...string) *PutAzureopenai { // 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 +// `"exists_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. diff --git a/typedapi/inference/putazureopenai/request.go b/typedapi/inference/putazureopenai/request.go index d774514cf8..6881ad0881 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putazureopenai @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putazureopenai // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_azureopenai/PutAzureOpenAiRequest.ts#L30-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b3462f1d99..c2ba42c35c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putazureopenai @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypeazureopenai" ) // Response holds the response body struct for the package putazureopenai // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_azureopenai/PutAzureOpenAiResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_azureopenai/PutAzureOpenAiResponse.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 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 03d14c699e..b8e23b21db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-cohere 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 @@ -382,7 +371,7 @@ func (r *PutCohere) FilterPath(filterpaths ...string) *PutCohere { // 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 +// `"exists_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. diff --git a/typedapi/inference/putcohere/request.go b/typedapi/inference/putcohere/request.go index dd555c17a8..e3ce0d1349 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putcohere @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putcohere // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_cohere/PutCohereRequest.ts#L30-L84 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5feb6f8212..da9e40bda6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putcohere @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypecohere" ) // Response holds the response body struct for the package putcohere // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_cohere/PutCohereResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_cohere/PutCohereResponse.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 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..dc5bf71c3f --- /dev/null +++ b/typedapi/inference/putcustom/put_custom.go @@ -0,0 +1,540 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +// 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/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/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=9") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + 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 +// `"exists_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 +} + +// The chunking configuration object. +// API name: chunking_settings +func (r *PutCustom) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutCustom { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + + return r +} + +// 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 { + // 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 the `custom` service. +// API name: service_settings +func (r *PutCustom) ServiceSettings(servicesettings types.CustomServiceSettingsVariant) *PutCustom { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ServiceSettings = *servicesettings.CustomServiceSettingsCaster() + + return r +} + +// 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.CustomTaskSettingsVariant) *PutCustom { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.TaskSettings = tasksettings.CustomTaskSettingsCaster() + + return r +} diff --git a/typedapi/inference/putcustom/request.go b/typedapi/inference/putcustom/request.go new file mode 100644 index 0000000000..68c388769a --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package putcustom + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/customservicetype" +) + +// Request holds the request body struct for the package putcustom +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..f8145ec083 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package putcustom + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypecustom" +) + +// Response holds the response body struct for the package putcustom +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..21e19534bd --- /dev/null +++ b/typedapi/inference/putdeepseek/put_deepseek.go @@ -0,0 +1,431 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +// 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/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/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/docs/api/doc/elasticsearch/operation/operation-inference-put-deepseek +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=9") + } + } + + if req.Header.Get("Accept") == "" { + req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=9") + } + + 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 +// `"exists_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 +} + +// The chunking configuration object. +// API name: chunking_settings +func (r *PutDeepseek) ChunkingSettings(chunkingsettings types.InferenceChunkingSettingsVariant) *PutDeepseek { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ChunkingSettings = chunkingsettings.InferenceChunkingSettingsCaster() + + return r +} + +// 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 { + // 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 the `deepseek` service. +// API name: service_settings +func (r *PutDeepseek) ServiceSettings(servicesettings types.DeepSeekServiceSettingsVariant) *PutDeepseek { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.ServiceSettings = *servicesettings.DeepSeekServiceSettingsCaster() + + return r +} diff --git a/typedapi/inference/putdeepseek/request.go b/typedapi/inference/putdeepseek/request.go new file mode 100644 index 0000000000..e3ee4448d5 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package putdeepseek + +import ( + "encoding/json" + "fmt" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/deepseekservicetype" +) + +// Request holds the request body struct for the package putdeepseek +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..7eb0c8a8cb --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package putdeepseek + +import ( + "encoding/json" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypedeepseek" +) + +// Response holds the response body struct for the package putdeepseek +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ff9a294cb9..03f4706ae2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 @@ -411,7 +420,7 @@ func (r *PutElasticsearch) FilterPath(filterpaths ...string) *PutElasticsearch { // 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 +// `"exists_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. diff --git a/typedapi/inference/putelasticsearch/request.go b/typedapi/inference/putelasticsearch/request.go index 5e5c87fd62..78c5e400b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putelasticsearch @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putelasticsearch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_elasticsearch/PutElasticsearchRequest.ts#L30-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 16e92a4319..d06c255b21 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putelasticsearch @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypeelasticsearch" ) // Response holds the response body struct for the package putelasticsearch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_elasticsearch/PutElasticsearchResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_elasticsearch/PutElasticsearchResponse.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 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 ef49fc4b68..8c9c0ffeff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 @@ -410,7 +419,7 @@ func (r *PutElser) FilterPath(filterpaths ...string) *PutElser { // 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 +// `"exists_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. diff --git a/typedapi/inference/putelser/request.go b/typedapi/inference/putelser/request.go index 3d4c220b1d..846ded6a30 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putelser @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putelser // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_elser/PutElserRequest.ts#L29-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ec42748284..7c790901f1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putelser @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypeelser" ) // Response holds the response body struct for the package putelser // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_elser/PutElserResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_elser/PutElserResponse.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 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 c93f5babcf..0ff8554575 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-googleaistudio 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 @@ -382,7 +371,7 @@ func (r *PutGoogleaistudio) FilterPath(filterpaths ...string) *PutGoogleaistudio // 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 +// `"exists_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. diff --git a/typedapi/inference/putgoogleaistudio/request.go b/typedapi/inference/putgoogleaistudio/request.go index 1945c100ac..4fde8ff451 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putgoogleaistudio @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putgoogleaistudio // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_googleaistudio/PutGoogleAiStudioRequest.ts#L29-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8d6ab8a435..f5b5af7735 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putgoogleaistudio @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypegoogleaistudio" ) // Response holds the response body struct for the package putgoogleaistudio // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_googleaistudio/PutGoogleAiStudioResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_googleaistudio/PutGoogleAiStudioResponse.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 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 7a4bb58344..7ee85bb46a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-googlevertexai 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 @@ -382,7 +371,7 @@ func (r *PutGooglevertexai) FilterPath(filterpaths ...string) *PutGooglevertexai // 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 +// `"exists_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. diff --git a/typedapi/inference/putgooglevertexai/request.go b/typedapi/inference/putgooglevertexai/request.go index 4385fb2a8c..b3193fd14e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putgooglevertexai @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putgooglevertexai // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_googlevertexai/PutGoogleVertexAiRequest.ts#L30-L83 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5581ebad91..ea6556c5a9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putgooglevertexai @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypegooglevertexai" ) // Response holds the response body struct for the package putgooglevertexai // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_googlevertexai/PutGoogleVertexAiResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_googlevertexai/PutGoogleVertexAiResponse.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 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 8c8b6d63e7..1597850670 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-hugging-face 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 @@ -418,7 +463,7 @@ func (r *PutHuggingFace) FilterPath(filterpaths ...string) *PutHuggingFace { // 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 +// `"exists_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. @@ -476,3 +521,17 @@ func (r *PutHuggingFace) ServiceSettings(servicesettings types.HuggingFaceServic return r } + +// 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.HuggingFaceTaskSettingsVariant) *PutHuggingFace { + // Initialize the request if it is not already initialized + if r.req == nil { + r.req = NewRequest() + } + + r.req.TaskSettings = tasksettings.HuggingFaceTaskSettingsCaster() + + return r +} diff --git a/typedapi/inference/puthuggingface/request.go b/typedapi/inference/puthuggingface/request.go index becd25678d..b5113fdb8d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puthuggingface @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package puthuggingface // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_hugging_face/PutHuggingFaceRequest.ts#L29-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 213587bf7d..55fd638f1c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puthuggingface @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypehuggingface" ) // Response holds the response body struct for the package puthuggingface // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_hugging_face/PutHuggingFaceResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_hugging_face/PutHuggingFaceResponse.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 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 016f62db9b..1fb16a1609 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-jinaai 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 @@ -390,7 +379,7 @@ func (r *PutJinaai) FilterPath(filterpaths ...string) *PutJinaai { // 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 +// `"exists_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. diff --git a/typedapi/inference/putjinaai/request.go b/typedapi/inference/putjinaai/request.go index 3fefc873b9..3011bb9a80 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putjinaai @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putjinaai // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_jinaai/PutJinaAiRequest.ts#L30-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 607ded75e6..446562c483 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putjinaai @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypejinaai" ) // Response holds the response body struct for the package putjinaai // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_jinaai/PutJinaAiResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_jinaai/PutJinaAiResponse.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 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 318a29a7e6..a23411319f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-mistral 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 @@ -383,7 +371,7 @@ func (r *PutMistral) FilterPath(filterpaths ...string) *PutMistral { // 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 +// `"exists_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. diff --git a/typedapi/inference/putmistral/request.go b/typedapi/inference/putmistral/request.go index ec796a5562..3db59c3847 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putmistral @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putmistral // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_mistral/PutMistralRequest.ts#L29-L78 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eed7daa841..2e686c6d8f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putmistral @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypemistral" ) // Response holds the response body struct for the package putmistral // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_mistral/PutMistralResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_mistral/PutMistralResponse.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 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 3c2124fee0..56a2fc00e8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-openai 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 @@ -384,7 +373,7 @@ func (r *PutOpenai) FilterPath(filterpaths ...string) *PutOpenai { // 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 +// `"exists_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. diff --git a/typedapi/inference/putopenai/request.go b/typedapi/inference/putopenai/request.go index 6f62fe48e0..33f64befa2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putopenai @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putopenai // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_openai/PutOpenAiRequest.ts#L30-L84 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f741782b66..6618b3ca61 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putopenai @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypeopenai" ) // Response holds the response body struct for the package putopenai // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_openai/PutOpenAiResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_openai/PutOpenAiResponse.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 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 c7f63392f4..cd3d133941 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 @@ -368,7 +377,7 @@ func (r *PutVoyageai) FilterPath(filterpaths ...string) *PutVoyageai { // 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 +// `"exists_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. diff --git a/typedapi/inference/putvoyageai/request.go b/typedapi/inference/putvoyageai/request.go index ff5542b0ca..d5a15cf54c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putvoyageai @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putvoyageai // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_voyageai/PutVoyageAIRequest.ts#L30-L79 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e8f14a1cc4..2fb1b1c75b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putvoyageai @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypevoyageai" ) // Response holds the response body struct for the package putvoyageai // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_voyageai/PutVoyageAIResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5a4e09e722..a9e2bb06c0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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/docs/api/doc/elasticsearch/operation/operation-inference-put-watsonx func New(tp elastictransport.Interface) *PutWatsonx { r := &PutWatsonx{ @@ -348,8 +328,7 @@ func (r *PutWatsonx) Header(key, value string) *PutWatsonx { 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 *PutWatsonx) _tasktype(tasktype string) *PutWatsonx { r.paramSet |= tasktypeMask @@ -367,6 +346,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 @@ -391,7 +379,7 @@ func (r *PutWatsonx) FilterPath(filterpaths ...string) *PutWatsonx { // 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 +// `"exists_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. diff --git a/typedapi/inference/putwatsonx/request.go b/typedapi/inference/putwatsonx/request.go index bd1d7badbd..09216f568b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putwatsonx @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putwatsonx // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_watsonx/PutWatsonxRequest.ts#L28-L74 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_watsonx/PutWatsonxRequest.ts#L29-L75 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 2b94100529..d3183c4a32 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putwatsonx @@ -24,12 +24,12 @@ import ( "encoding/json" "github.com/elastic/go-elasticsearch/v9/typedapi/types" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tasktypewatsonx" ) // Response holds the response body struct for the package putwatsonx // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/put_watsonx/PutWatsonxResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/put_watsonx/PutWatsonxResponse.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 tasktypewatsonx.TaskTypeWatsonx `json:"task_type"` } // NewResponse returns a Response diff --git a/typedapi/inference/rerank/request.go b/typedapi/inference/rerank/request.go index 4a2eb347e4..611e6f2096 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package rerank @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package rerank // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/rerank/RerankRequest.ts#L25-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 04a2a0c64a..13406fcd30 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e -// 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/docs/api/doc/elasticsearch/operation/operation-inference-inference func New(tp elastictransport.Interface) *Rerank { @@ -345,7 +345,7 @@ func (r *Rerank) FilterPath(filterpaths ...string) *Rerank { // 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 +// `"exists_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. diff --git a/typedapi/inference/rerank/response.go b/typedapi/inference/rerank/response.go index 24d997d898..343af38ab6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package rerank @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package rerank // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/rerank/RerankResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/rerank/RerankResponse.ts#L22-L25 type Response []types.RankedDocument diff --git a/typedapi/inference/sparseembedding/request.go b/typedapi/inference/sparseembedding/request.go index 4b448346e6..43e31ded03 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package sparseembedding @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package sparseembedding // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/sparse_embedding/SparseEmbeddingRequest.ts#L25-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f68d1db1b1..f91e0d5487 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package sparseembedding @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package sparseembedding // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/sparse_embedding/SparseEmbeddingResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/sparse_embedding/SparseEmbeddingResponse.ts#L22-L25 type Response []types.SparseEmbeddingResult diff --git a/typedapi/inference/sparseembedding/sparse_embedding.go b/typedapi/inference/sparseembedding/sparse_embedding.go index e92765ab3c..490ba880c5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Perform sparse embedding inference on the service package sparseembedding @@ -345,7 +345,7 @@ func (r *SparseEmbedding) FilterPath(filterpaths ...string) *SparseEmbedding { // 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 +// `"exists_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. diff --git a/typedapi/inference/streamcompletion/request.go b/typedapi/inference/streamcompletion/request.go index 394cbe7caa..c87085e348 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package streamcompletion @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package streamcompletion // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/stream_completion/StreamInferenceRequest.ts#L24-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 770c1b4f72..dbadc515dd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package streamcompletion // Response holds the response body struct for the package streamcompletion // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/stream_completion/StreamInferenceResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/stream_completion/StreamInferenceResponse.ts#L22-L25 type Response = []byte diff --git a/typedapi/inference/streamcompletion/stream_completion.go b/typedapi/inference/streamcompletion/stream_completion.go index 35ce26a450..50d34da1c3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 @@ -371,7 +379,7 @@ func (r *StreamCompletion) FilterPath(filterpaths ...string) *StreamCompletion { // 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 +// `"exists_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. diff --git a/typedapi/inference/textembedding/request.go b/typedapi/inference/textembedding/request.go index 2692a48173..b02940b0d1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package textembedding @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package textembedding // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/text_embedding/TextEmbeddingRequest.ts#L25-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f1ff376e99..a0e7fd47c9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package textembedding @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package textembedding // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/text_embedding/TextEmbeddingResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/text_embedding/TextEmbeddingResponse.ts#L22-L25 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 783f5d2005..0e6d68ace2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Perform text embedding inference on the service package textembedding @@ -345,7 +345,7 @@ func (r *TextEmbedding) FilterPath(filterpaths ...string) *TextEmbedding { // 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 +// `"exists_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. diff --git a/typedapi/inference/update/request.go b/typedapi/inference/update/request.go index a2f10d4f8b..7b66406360 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package update @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/update/UpdateInferenceRequest.ts#L25-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8efe57de6a..48ca89ee77 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package update @@ -29,7 +29,7 @@ import ( // Response holds the response body struct for the package update // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/update/UpdateInferenceResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/update/UpdateInferenceResponse.ts#L22-L25 type Response struct { // ChunkingSettings Chunking configuration object diff --git a/typedapi/inference/update/update.go b/typedapi/inference/update/update.go index aafe4e3797..17c4752ee4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update an inference endpoint. // @@ -396,7 +396,7 @@ func (r *Update) FilterPath(filterpaths ...string) *Update { // 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 +// `"exists_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. diff --git a/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go b/typedapi/ingest/deletegeoipdatabase/delete_geoip_database.go index 77a104734d..519fbe2642 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete GeoIP database configurations. // @@ -348,7 +348,7 @@ func (r *DeleteGeoipDatabase) FilterPath(filterpaths ...string) *DeleteGeoipData // 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 +// `"exists_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. diff --git a/typedapi/ingest/deletegeoipdatabase/response.go b/typedapi/ingest/deletegeoipdatabase/response.go index 1f97a9cd5f..37e517cc82 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletegeoipdatabase // Response holds the response body struct for the package deletegeoipdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/delete_geoip_database/DeleteGeoipDatabaseResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/delete_geoip_database/DeleteGeoipDatabaseResponse.ts#L22-L25 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 cb6d625e6f..0a20a5bd7d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete IP geolocation database configurations. package deleteiplocationdatabase @@ -347,7 +347,7 @@ func (r *DeleteIpLocationDatabase) FilterPath(filterpaths ...string) *DeleteIpLo // 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 +// `"exists_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. diff --git a/typedapi/ingest/deleteiplocationdatabase/response.go b/typedapi/ingest/deleteiplocationdatabase/response.go index f00d1ff803..e6ca567345 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleteiplocationdatabase // Response holds the response body struct for the package deleteiplocationdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/delete_ip_location_database/DeleteIpLocationDatabaseResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/delete_ip_location_database/DeleteIpLocationDatabaseResponse.ts#L22-L25 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 472b18d71b..bed879ec80 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete pipelines. // Delete one or more ingest pipelines. @@ -346,7 +346,7 @@ func (r *DeletePipeline) FilterPath(filterpaths ...string) *DeletePipeline { // 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 +// `"exists_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. diff --git a/typedapi/ingest/deletepipeline/response.go b/typedapi/ingest/deletepipeline/response.go index f4cf2c5d9e..8dfe331063 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletepipeline // Response holds the response body struct for the package deletepipeline // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/delete_pipeline/DeletePipelineResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/delete_pipeline/DeletePipelineResponse.ts#L22-L25 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 78084eb36c..21785b138b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get GeoIP statistics. // Get download statistics for GeoIP2 databases that are used with the GeoIP @@ -306,7 +306,7 @@ func (r *GeoIpStats) FilterPath(filterpaths ...string) *GeoIpStats { // 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 +// `"exists_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. diff --git a/typedapi/ingest/geoipstats/response.go b/typedapi/ingest/geoipstats/response.go index 2780ab1248..3942715005 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package geoipstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package geoipstats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/geo_ip_stats/IngestGeoIpStatsResponse.ts#L24-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dc8e7d7109..ecce081d57 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get GeoIP database configurations. // @@ -338,7 +338,7 @@ func (r *GetGeoipDatabase) FilterPath(filterpaths ...string) *GetGeoipDatabase { // 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 +// `"exists_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. diff --git a/typedapi/ingest/getgeoipdatabase/response.go b/typedapi/ingest/getgeoipdatabase/response.go index 505815b4b2..b890e0ecfd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getgeoipdatabase @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getgeoipdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8cc39d7d49..eaf2e79cc5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 @@ -345,7 +334,7 @@ func (r *GetIpLocationDatabase) FilterPath(filterpaths ...string) *GetIpLocation // 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 +// `"exists_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. diff --git a/typedapi/ingest/getiplocationdatabase/response.go b/typedapi/ingest/getiplocationdatabase/response.go index 5f7eb592d9..bf3e6ea9b9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getiplocationdatabase @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getiplocationdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9c4f587ff9..67e4ef49fa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get pipelines. // @@ -354,7 +354,7 @@ func (r *GetPipeline) FilterPath(filterpaths ...string) *GetPipeline { // 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 +// `"exists_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. diff --git a/typedapi/ingest/getpipeline/response.go b/typedapi/ingest/getpipeline/response.go index e216151644..66179dcf6d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getpipeline @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/get_pipeline/GetPipelineResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1f17e4abd0..59a945efed 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run a grok processor. // Extract structured fields out of a single text field within a document. @@ -312,7 +312,7 @@ func (r *ProcessorGrok) FilterPath(filterpaths ...string) *ProcessorGrok { // 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 +// `"exists_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. diff --git a/typedapi/ingest/processorgrok/response.go b/typedapi/ingest/processorgrok/response.go index 9e4525083a..733dab7325 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package processorgrok // Response holds the response body struct for the package processorgrok // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/processor_grok/GrokProcessorPatternsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7f3bf6d5b7..031d025f4a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a GeoIP database configuration. // @@ -362,7 +362,7 @@ func (r *PutGeoipDatabase) FilterPath(filterpaths ...string) *PutGeoipDatabase { // 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 +// `"exists_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. diff --git a/typedapi/ingest/putgeoipdatabase/request.go b/typedapi/ingest/putgeoipdatabase/request.go index 9688f7dcac..8f1e8aea99 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putgeoipdatabase @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package putgeoipdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/put_geoip_database/PutGeoipDatabaseRequest.ts#L25-L66 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3aeb41da82..9eae23993e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putgeoipdatabase // Response holds the response body struct for the package putgeoipdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/put_geoip_database/PutGeoipDatabaseResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/put_geoip_database/PutGeoipDatabaseResponse.ts#L22-L25 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 50e22cb5fa..3ed807ec91 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update an IP geolocation database configuration. package putiplocationdatabase @@ -363,7 +363,7 @@ func (r *PutIpLocationDatabase) FilterPath(filterpaths ...string) *PutIpLocation // 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 +// `"exists_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. diff --git a/typedapi/ingest/putiplocationdatabase/request.go b/typedapi/ingest/putiplocationdatabase/request.go index fe35d091b0..9f31c8341e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putiplocationdatabase @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putiplocationdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/put_ip_location_database/PutIpLocationDatabaseRequest.ts#L25-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 19e8eb64cc..735e6632ad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putiplocationdatabase // Response holds the response body struct for the package putiplocationdatabase // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/put_ip_location_database/PutIpLocationDatabaseResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/put_ip_location_database/PutIpLocationDatabaseResponse.ts#L22-L25 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 a2c066af09..0dea3ea0f8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a pipeline. // Changes made using this API take effect immediately. @@ -365,7 +365,7 @@ func (r *PutPipeline) FilterPath(filterpaths ...string) *PutPipeline { // 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 +// `"exists_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. diff --git a/typedapi/ingest/putpipeline/request.go b/typedapi/ingest/putpipeline/request.go index 0e0bd36bd5..d2eea1fcf0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putpipeline @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/put_pipeline/PutPipelineRequest.ts#L25-L90 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 10917ba062..51ca75ed9f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putpipeline // Response holds the response body struct for the package putpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/put_pipeline/PutPipelineResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/put_pipeline/PutPipelineResponse.ts#L22-L25 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 6785912842..4845aaffba 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package simulate @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package simulate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/simulate/SimulatePipelineRequest.ts#L25-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6d4fa22847..6b3914baca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package simulate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package simulate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/simulate/SimulatePipelineResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5e99b5d853..9f4c23227f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Simulate a pipeline. // @@ -365,7 +365,7 @@ func (r *Simulate) FilterPath(filterpaths ...string) *Simulate { // 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 +// `"exists_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. diff --git a/typedapi/license/delete/delete.go b/typedapi/license/delete/delete.go index 627153b2ef..cb1a2c0627 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete the license. // @@ -325,7 +325,7 @@ func (r *Delete) FilterPath(filterpaths ...string) *Delete { // 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 +// `"exists_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. diff --git a/typedapi/license/delete/response.go b/typedapi/license/delete/response.go index 5b30063570..4b4d817785 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/delete/DeleteLicenseResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/delete/DeleteLicenseResponse.ts#L22-L25 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 0890e02cf5..555387fd99 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get license information. // @@ -336,7 +336,7 @@ func (r *Get) FilterPath(filterpaths ...string) *Get { // 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 +// `"exists_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. diff --git a/typedapi/license/get/response.go b/typedapi/license/get/response.go index bb1884b828..a36319a5dc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/get/GetLicenseResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 967a50244e..6efb84542c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the basic license status. package getbasicstatus @@ -300,7 +300,7 @@ func (r *GetBasicStatus) FilterPath(filterpaths ...string) *GetBasicStatus { // 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 +// `"exists_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. diff --git a/typedapi/license/getbasicstatus/response.go b/typedapi/license/getbasicstatus/response.go index 0902e7b70f..93a1c0f6ab 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getbasicstatus // Response holds the response body struct for the package getbasicstatus // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/get_basic_status/GetBasicLicenseStatusResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b8286c2633..3ee6f96d3f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the trial status. package gettrialstatus @@ -300,7 +300,7 @@ func (r *GetTrialStatus) FilterPath(filterpaths ...string) *GetTrialStatus { // 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 +// `"exists_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. diff --git a/typedapi/license/gettrialstatus/response.go b/typedapi/license/gettrialstatus/response.go index 91ef4d8ad0..84c000dbad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package gettrialstatus // Response holds the response body struct for the package gettrialstatus // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/get_trial_status/GetTrialLicenseStatusResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 213a88d701..25320acc06 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update the license. // @@ -365,7 +365,7 @@ func (r *Post) FilterPath(filterpaths ...string) *Post { // 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 +// `"exists_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. diff --git a/typedapi/license/post/request.go b/typedapi/license/post/request.go index 8a2ab67a06..490ce033d3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package post @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/post/PostLicenseRequest.ts#L24-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c86750f263..b18cc04372 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package post @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package post // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/post/PostLicenseResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f9cbda5f31..c2e0e1dc07 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Start a basic license. // @@ -351,7 +351,7 @@ func (r *PostStartBasic) FilterPath(filterpaths ...string) *PostStartBasic { // 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 +// `"exists_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. diff --git a/typedapi/license/poststartbasic/response.go b/typedapi/license/poststartbasic/response.go index 61b6db1036..1fbdf732fc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package poststartbasic @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package poststartbasic // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/post_start_basic/StartBasicLicenseResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 65477ce59b..7240ae798e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 } @@ -341,7 +342,7 @@ func (r *PostStartTrial) FilterPath(filterpaths ...string) *PostStartTrial { // 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 +// `"exists_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. diff --git a/typedapi/license/poststarttrial/response.go b/typedapi/license/poststarttrial/response.go index a8bd03f11a..52064635be 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package poststarttrial @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package poststarttrial // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/post_start_trial/StartTrialLicenseResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 483ad01a01..3a06731404 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a Logstash pipeline. // Delete a pipeline that is used for Logstash Central Management. @@ -278,7 +278,7 @@ func (r *DeletePipeline) FilterPath(filterpaths ...string) *DeletePipeline { // 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 +// `"exists_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. diff --git a/typedapi/logstash/getpipeline/get_pipeline.go b/typedapi/logstash/getpipeline/get_pipeline.go index 49b4820a8d..40c248f54b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get Logstash pipelines. // Get pipelines that are used for Logstash Central Management. @@ -330,7 +330,7 @@ func (r *GetPipeline) FilterPath(filterpaths ...string) *GetPipeline { // 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 +// `"exists_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. diff --git a/typedapi/logstash/getpipeline/response.go b/typedapi/logstash/getpipeline/response.go index 7ddd2f2d83..757529ea55 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getpipeline @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/logstash/get_pipeline/LogstashGetPipelineResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4c016844f6..4efe5377da 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a Logstash pipeline. // @@ -289,7 +289,7 @@ func (r *PutPipeline) FilterPath(filterpaths ...string) *PutPipeline { // 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 +// `"exists_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. diff --git a/typedapi/logstash/putpipeline/request.go b/typedapi/logstash/putpipeline/request.go index 8bbe97efa7..eeb6b7e0bd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putpipeline @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putpipeline // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/logstash/put_pipeline/LogstashPutPipelineRequest.ts#L24-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 92992a8cdb..bbddc112c1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get deprecation information. // Get information about different cluster, node, and index level settings that @@ -341,7 +341,7 @@ func (r *Deprecations) FilterPath(filterpaths ...string) *Deprecations { // 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 +// `"exists_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. diff --git a/typedapi/migration/deprecations/response.go b/typedapi/migration/deprecations/response.go index 8efa19a8e1..5d602de53f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deprecations @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deprecations // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/migration/deprecations/DeprecationInfoResponse.ts#L23-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f5f3fc6bd2..10b2d6b1d8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get feature migration information. // Version upgrades sometimes require changes to how features store @@ -314,7 +314,7 @@ func (r *GetFeatureUpgradeStatus) FilterPath(filterpaths ...string) *GetFeatureU // 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 +// `"exists_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. diff --git a/typedapi/migration/getfeatureupgradestatus/response.go b/typedapi/migration/getfeatureupgradestatus/response.go index 69845e5efe..9e35d1b257 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getfeatureupgradestatus @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package getfeatureupgradestatus // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 60a50f3dc9..4db8f8f44a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Start the feature migration. // Version upgrades sometimes require changes to how features store @@ -318,7 +318,7 @@ func (r *PostFeatureUpgrade) FilterPath(filterpaths ...string) *PostFeatureUpgra // 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 +// `"exists_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. diff --git a/typedapi/migration/postfeatureupgrade/response.go b/typedapi/migration/postfeatureupgrade/response.go index cc9f7a8fba..7b5dd33754 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package postfeatureupgrade @@ -26,10 +26,11 @@ import ( // Response holds the response body struct for the package postfeatureupgrade // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L20-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 577b875b0a..6278c22ff6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clear trained model deployment cache. // @@ -347,7 +347,7 @@ func (r *ClearTrainedModelDeploymentCache) FilterPath(filterpaths ...string) *Cl // 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 +// `"exists_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. diff --git a/typedapi/ml/cleartrainedmodeldeploymentcache/response.go b/typedapi/ml/cleartrainedmodeldeploymentcache/response.go index b2bfad7cbf..858034385a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package cleartrainedmodeldeploymentcache // Response holds the response body struct for the package cleartrainedmodeldeploymentcache // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/clear_trained_model_deployment_cache/MlClearTrainedModelDeploymentCacheResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b4572fc883..c2f9560a05 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Close anomaly detection jobs. // @@ -377,7 +377,7 @@ func (r *CloseJob) FilterPath(filterpaths ...string) *CloseJob { // 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 +// `"exists_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. diff --git a/typedapi/ml/closejob/request.go b/typedapi/ml/closejob/request.go index fe220967d8..c2a5e0fdb1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package closejob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package closejob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/close_job/MlCloseJobRequest.ts#L24-L85 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 456735c329..0131eb782c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package closejob // Response holds the response body struct for the package closejob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/close_job/MlCloseJobResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eb0c2b77a9..c54635ae72 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a calendar. // @@ -327,7 +327,7 @@ func (r *DeleteCalendar) FilterPath(filterpaths ...string) *DeleteCalendar { // 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 +// `"exists_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. diff --git a/typedapi/ml/deletecalendar/response.go b/typedapi/ml/deletecalendar/response.go index 3ddb34a8aa..5bff6de555 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletecalendar // Response holds the response body struct for the package deletecalendar // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_calendar/MlDeleteCalendarResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_calendar/MlDeleteCalendarResponse.ts#L22-L25 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 d270fbf87a..644d5c9b7b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete events from a calendar. package deletecalendarevent @@ -346,7 +346,7 @@ func (r *DeleteCalendarEvent) FilterPath(filterpaths ...string) *DeleteCalendarE // 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 +// `"exists_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. diff --git a/typedapi/ml/deletecalendarevent/response.go b/typedapi/ml/deletecalendarevent/response.go index fdd5edc3cf..e5c8f3bc60 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletecalendarevent // Response holds the response body struct for the package deletecalendarevent // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_calendar_event/MlDeleteCalendarEventResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_calendar_event/MlDeleteCalendarEventResponse.ts#L22-L25 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 10309a298f..bb769af4aa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete anomaly jobs from a calendar. package deletecalendarjob @@ -347,7 +347,7 @@ func (r *DeleteCalendarJob) FilterPath(filterpaths ...string) *DeleteCalendarJob // 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 +// `"exists_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. diff --git a/typedapi/ml/deletecalendarjob/response.go b/typedapi/ml/deletecalendarjob/response.go index 74d99b62d3..b44c4683a4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletecalendarjob @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package deletecalendarjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_calendar_job/MlDeleteCalendarJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6828c1571f..3f5a5e3900 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a datafeed. package deletedatafeed @@ -335,7 +335,7 @@ func (r *DeleteDatafeed) FilterPath(filterpaths ...string) *DeleteDatafeed { // 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 +// `"exists_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. diff --git a/typedapi/ml/deletedatafeed/response.go b/typedapi/ml/deletedatafeed/response.go index 30a84a7afd..38549eaac1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletedatafeed // Response holds the response body struct for the package deletedatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_datafeed/MlDeleteDatafeedResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_datafeed/MlDeleteDatafeedResponse.ts#L22-L25 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 17439229b8..45bf3ab85f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a data frame analytics job. package deletedataframeanalytics @@ -342,7 +342,7 @@ func (r *DeleteDataFrameAnalytics) FilterPath(filterpaths ...string) *DeleteData // 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 +// `"exists_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. diff --git a/typedapi/ml/deletedataframeanalytics/response.go b/typedapi/ml/deletedataframeanalytics/response.go index 1adfcdc19f..369ac16799 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletedataframeanalytics // Response holds the response body struct for the package deletedataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_data_frame_analytics/MlDeleteDataFrameAnalyticsResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_data_frame_analytics/MlDeleteDataFrameAnalyticsResponse.ts#L22-L25 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 a4705433ba..2804070c76 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete expired ML data. // @@ -361,7 +361,7 @@ func (r *DeleteExpiredData) FilterPath(filterpaths ...string) *DeleteExpiredData // 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 +// `"exists_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. diff --git a/typedapi/ml/deleteexpireddata/request.go b/typedapi/ml/deleteexpireddata/request.go index fd5dded9ed..10d95c497d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleteexpireddata @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package deleteexpireddata // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_expired_data/MlDeleteExpiredDataRequest.ts#L25-L85 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 11221034e6..3ddbdcba94 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleteexpireddata // Response holds the response body struct for the package deleteexpireddata // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_expired_data/MlDeleteExpiredDataResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3808bba68f..9be18b2e51 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a filter. // @@ -329,7 +329,7 @@ func (r *DeleteFilter) FilterPath(filterpaths ...string) *DeleteFilter { // 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 +// `"exists_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. diff --git a/typedapi/ml/deletefilter/response.go b/typedapi/ml/deletefilter/response.go index a975d758e7..ee1b09d2b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletefilter // Response holds the response body struct for the package deletefilter // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_filter/MlDeleteFilterResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_filter/MlDeleteFilterResponse.ts#L22-L25 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 81c576d9a6..e87c11dffb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete forecasts from a job. // @@ -391,7 +391,7 @@ func (r *DeleteForecast) FilterPath(filterpaths ...string) *DeleteForecast { // 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 +// `"exists_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. diff --git a/typedapi/ml/deleteforecast/response.go b/typedapi/ml/deleteforecast/response.go index 3f2459cc8e..cb3fbf726f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleteforecast // Response holds the response body struct for the package deleteforecast // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_forecast/MlDeleteForecastResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_forecast/MlDeleteForecastResponse.ts#L22-L25 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 cb09570f13..62f75e28da 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete an anomaly detection job. // @@ -366,7 +366,7 @@ func (r *DeleteJob) FilterPath(filterpaths ...string) *DeleteJob { // 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 +// `"exists_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. diff --git a/typedapi/ml/deletejob/response.go b/typedapi/ml/deletejob/response.go index 6cb2e92921..0891a0e4fb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletejob // Response holds the response body struct for the package deletejob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_job/MlDeleteJobResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_job/MlDeleteJobResponse.ts#L22-L25 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 3d53b3796d..e6feb6ac62 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a model snapshot. // @@ -353,7 +353,7 @@ func (r *DeleteModelSnapshot) FilterPath(filterpaths ...string) *DeleteModelSnap // 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 +// `"exists_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. diff --git a/typedapi/ml/deletemodelsnapshot/response.go b/typedapi/ml/deletemodelsnapshot/response.go index 00f9464f81..fce16ebca6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletemodelsnapshot // Response holds the response body struct for the package deletemodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_model_snapshot/MlDeleteModelSnapshotResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_model_snapshot/MlDeleteModelSnapshotResponse.ts#L22-L25 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 47438c4a2b..260fb321ab 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete an unreferenced trained model. // @@ -347,7 +347,7 @@ func (r *DeleteTrainedModel) FilterPath(filterpaths ...string) *DeleteTrainedMod // 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 +// `"exists_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. diff --git a/typedapi/ml/deletetrainedmodel/response.go b/typedapi/ml/deletetrainedmodel/response.go index aeb8f5cc65..792e853b38 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletetrainedmodel // Response holds the response body struct for the package deletetrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_trained_model/MlDeleteTrainedModelResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_trained_model/MlDeleteTrainedModelResponse.ts#L22-L25 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 bcddc7054b..fd5bb703b1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a trained model alias. // @@ -359,7 +359,7 @@ func (r *DeleteTrainedModelAlias) FilterPath(filterpaths ...string) *DeleteTrain // 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 +// `"exists_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. diff --git a/typedapi/ml/deletetrainedmodelalias/response.go b/typedapi/ml/deletetrainedmodelalias/response.go index 97965de05b..49ddefb696 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletetrainedmodelalias // Response holds the response body struct for the package deletetrainedmodelalias // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/delete_trained_model_alias/MlDeleteTrainedModelAliasResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/delete_trained_model_alias/MlDeleteTrainedModelAliasResponse.ts#L22-L25 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 32a97fb755..88735c5115 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Estimate job model memory usage. // @@ -326,7 +326,7 @@ func (r *EstimateModelMemory) FilterPath(filterpaths ...string) *EstimateModelMe // 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 +// `"exists_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. diff --git a/typedapi/ml/estimatemodelmemory/request.go b/typedapi/ml/estimatemodelmemory/request.go index 386437120c..4a38f3d6b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package estimatemodelmemory @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package estimatemodelmemory // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/estimate_model_memory/MlEstimateModelMemoryRequest.ts#L26-L71 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 27e4d2e015..e4a803d37a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package estimatemodelmemory // Response holds the response body struct for the package estimatemodelmemory // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/estimate_model_memory/MlEstimateModelMemoryResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9e8fc0af0a..f4a321b4fa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Evaluate data frame analytics. // @@ -326,7 +326,7 @@ func (r *EvaluateDataFrame) FilterPath(filterpaths ...string) *EvaluateDataFrame // 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 +// `"exists_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. diff --git a/typedapi/ml/evaluatedataframe/request.go b/typedapi/ml/evaluatedataframe/request.go index ed8955b64f..b27112f1fe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package evaluatedataframe @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package evaluatedataframe // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/MlEvaluateDataFrameRequest.ts#L25-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eb3341a8b6..436f1117f6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package evaluatedataframe @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package evaluatedataframe // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/MlEvaluateDataFrameResponse.ts#L26-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f4ad8abb36..dc51955b6a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Explain data frame analytics config. // @@ -370,7 +370,7 @@ func (r *ExplainDataFrameAnalytics) FilterPath(filterpaths ...string) *ExplainDa // 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 +// `"exists_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. diff --git a/typedapi/ml/explaindataframeanalytics/request.go b/typedapi/ml/explaindataframeanalytics/request.go index e09db8c572..b88423cd6e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package explaindataframeanalytics @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package explaindataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsRequest.ts#L30-L120 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d4c8ac58ac..a697c42c58 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package explaindataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package explaindataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/explain_data_frame_analytics/MlExplainDataFrameAnalyticsResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5b1a1ead76..bf7380883c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Force buffered data to be processed. // The flush jobs API is only applicable when sending data for analysis using @@ -355,7 +355,7 @@ func (r *FlushJob) FilterPath(filterpaths ...string) *FlushJob { // 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 +// `"exists_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. diff --git a/typedapi/ml/flushjob/request.go b/typedapi/ml/flushjob/request.go index 315d66d9b4..124e96d31c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package flushjob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package flushjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/flush_job/MlFlushJobRequest.ts#L24-L108 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/flush_job/MlFlushJobRequest.ts#L24-L108 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 afe9a1a6a1..1d2bb7a141 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package flushjob // Response holds the response body struct for the package flushjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/flush_job/MlFlushJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 375dfb5fdb..53c11fcc24 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Predict future behavior of a time series. // @@ -350,7 +350,7 @@ func (r *Forecast) FilterPath(filterpaths ...string) *Forecast { // 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 +// `"exists_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. diff --git a/typedapi/ml/forecast/request.go b/typedapi/ml/forecast/request.go index 30d1d4f1ad..69c6a445e8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package forecast @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package forecast // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/forecast/MlForecastJobRequest.ts#L24-L95 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c658c32f53..4be5f1ffb9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package forecast // Response holds the response body struct for the package forecast // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/forecast/MlForecastJobResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 517bd156eb..0781cbbab1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get anomaly detection job results for buckets. // The API presents a chronological view of the records, grouped by bucket. @@ -395,7 +395,7 @@ func (r *GetBuckets) FilterPath(filterpaths ...string) *GetBuckets { // 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 +// `"exists_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. diff --git a/typedapi/ml/getbuckets/request.go b/typedapi/ml/getbuckets/request.go index 4dc58b76fa..c4216999c9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getbuckets @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package getbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_buckets/MlGetBucketsRequest.ts#L26-L145 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e0ab475c85..b8fec7af6a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getbuckets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_buckets/MlGetBucketsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 38d91cccbf..a18abfc680 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get info about events in calendars. package getcalendarevents @@ -369,7 +369,7 @@ func (r *GetCalendarEvents) FilterPath(filterpaths ...string) *GetCalendarEvents // 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 +// `"exists_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. diff --git a/typedapi/ml/getcalendarevents/response.go b/typedapi/ml/getcalendarevents/response.go index 05d9f4c9c4..66ae8851ff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getcalendarevents @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcalendarevents // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_calendar_events/MlGetCalendarEventsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 64d4d52f43..95da3c0640 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get calendar configuration info. package getcalendars @@ -363,7 +363,7 @@ func (r *GetCalendars) FilterPath(filterpaths ...string) *GetCalendars { // 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 +// `"exists_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. diff --git a/typedapi/ml/getcalendars/request.go b/typedapi/ml/getcalendars/request.go index 83bafbbf57..8f082090bc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getcalendars @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package getcalendars // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_calendars/MlGetCalendarsRequest.ts#L25-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2c84dc3008..2d7cd005a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getcalendars @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcalendars // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_calendars/MlGetCalendarsResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 74da0af520..4297b275a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get anomaly detection job results for categories. package getcategories @@ -404,7 +404,7 @@ func (r *GetCategories) FilterPath(filterpaths ...string) *GetCategories { // 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 +// `"exists_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. diff --git a/typedapi/ml/getcategories/request.go b/typedapi/ml/getcategories/request.go index 39406b5e41..3555804468 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getcategories @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package getcategories // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_categories/MlGetCategoriesRequest.ts#L25-L82 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dcebc23c49..44f8f5b85c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getcategories @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getcategories // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_categories/MlGetCategoriesResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b68aafbcfd..6c2ed8172b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get datafeeds configuration info. // You can get information for multiple datafeeds in a single API request by @@ -367,7 +367,7 @@ func (r *GetDatafeeds) FilterPath(filterpaths ...string) *GetDatafeeds { // 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 +// `"exists_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. diff --git a/typedapi/ml/getdatafeeds/response.go b/typedapi/ml/getdatafeeds/response.go index a7f56e16a3..ad7f38ca7d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getdatafeeds @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatafeeds // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_datafeeds/MlGetDatafeedsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ebbdeaef01..41582a6a21 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e -// 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 @@ -363,7 +363,7 @@ func (r *GetDatafeedStats) FilterPath(filterpaths ...string) *GetDatafeedStats { // 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 +// `"exists_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. diff --git a/typedapi/ml/getdatafeedstats/response.go b/typedapi/ml/getdatafeedstats/response.go index af55292701..ba8f5a1f6b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getdatafeedstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdatafeedstats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_datafeed_stats/MlGetDatafeedStatsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ac0d5569dd..d6a790fb64 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get data frame analytics job configuration info. // You can get information for multiple data frame analytics jobs in a single @@ -384,7 +384,7 @@ func (r *GetDataFrameAnalytics) FilterPath(filterpaths ...string) *GetDataFrameA // 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 +// `"exists_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. diff --git a/typedapi/ml/getdataframeanalytics/response.go b/typedapi/ml/getdataframeanalytics/response.go index b09deba575..5ffc5205af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getdataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_data_frame_analytics/MlGetDataFrameAnalyticsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bd1fcea957..286600e2b9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e -// 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/docs/api/doc/elasticsearch/operation/operation-ml-get-data-frame-analytics-stats func New(tp elastictransport.Interface) *GetDataFrameAnalyticsStats { @@ -380,7 +380,7 @@ func (r *GetDataFrameAnalyticsStats) FilterPath(filterpaths ...string) *GetDataF // 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 +// `"exists_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. diff --git a/typedapi/ml/getdataframeanalyticsstats/response.go b/typedapi/ml/getdataframeanalyticsstats/response.go index 3143cdd999..99eff6cc94 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getdataframeanalyticsstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getdataframeanalyticsstats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_data_frame_analytics_stats/MlGetDataFrameAnalyticsStatsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 456a922512..1ae1d51309 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get filters. // You can get a single filter or all filters. @@ -346,7 +346,7 @@ func (r *GetFilters) FilterPath(filterpaths ...string) *GetFilters { // 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 +// `"exists_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. diff --git a/typedapi/ml/getfilters/response.go b/typedapi/ml/getfilters/response.go index 9d5bc84e27..d8b03aba55 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getfilters @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getfilters // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_filters/MlGetFiltersResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f12f1b9b58..ad8a8be6d8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get anomaly detection job results for influencers. // Influencers are the entities that have contributed to, or are to blame for, @@ -417,7 +417,7 @@ func (r *GetInfluencers) FilterPath(filterpaths ...string) *GetInfluencers { // 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 +// `"exists_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. diff --git a/typedapi/ml/getinfluencers/request.go b/typedapi/ml/getinfluencers/request.go index b5034be6da..1c871cc2a2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getinfluencers @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package getinfluencers // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_influencers/MlGetInfluencersRequest.ts#L26-L105 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2d7b8d90ca..6b2c231670 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getinfluencers @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getinfluencers // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_influencers/MlGetInfluencersResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eb62850cab..ce46042661 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get anomaly detection jobs configuration info. // You can get information for multiple anomaly detection jobs in a single API @@ -365,7 +365,7 @@ func (r *GetJobs) FilterPath(filterpaths ...string) *GetJobs { // 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 +// `"exists_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. diff --git a/typedapi/ml/getjobs/response.go b/typedapi/ml/getjobs/response.go index 56d2649080..31c4312e81 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getjobs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getjobs // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_jobs/MlGetJobsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fe095a2160..32c61e1b98 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e -// 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/docs/api/doc/elasticsearch/operation/operation-ml-get-job-stats func New(tp elastictransport.Interface) *GetJobStats { @@ -352,7 +352,7 @@ func (r *GetJobStats) FilterPath(filterpaths ...string) *GetJobStats { // 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 +// `"exists_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. diff --git a/typedapi/ml/getjobstats/response.go b/typedapi/ml/getjobstats/response.go index f9e8f9c963..d8518e703b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getjobstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getjobstats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_job_stats/MlGetJobStatsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 928296d954..417ea92a8f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get machine learning memory usage info. // Get information about how machine learning jobs and trained models are using @@ -360,7 +360,7 @@ func (r *GetMemoryStats) FilterPath(filterpaths ...string) *GetMemoryStats { // 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 +// `"exists_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. diff --git a/typedapi/ml/getmemorystats/response.go b/typedapi/ml/getmemorystats/response.go index aed16672e1..3df24f4eee 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getmemorystats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmemorystats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_memory_stats/MlGetMemoryStatsResponse.ts#L25-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a3036ef18f..010e9aa7c0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get model snapshots info. package getmodelsnapshots @@ -392,7 +392,7 @@ func (r *GetModelSnapshots) FilterPath(filterpaths ...string) *GetModelSnapshots // 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 +// `"exists_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. diff --git a/typedapi/ml/getmodelsnapshots/request.go b/typedapi/ml/getmodelsnapshots/request.go index cf23ca4fbd..3b0e2dedb4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getmodelsnapshots @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package getmodelsnapshots // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_model_snapshots/MlGetModelSnapshotsRequest.ts#L26-L108 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cddc004ccf..ff7e76fa35 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getmodelsnapshots @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmodelsnapshots // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_model_snapshots/MlGetModelSnapshotsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3e47c08709..607114e908 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get anomaly detection job model snapshot upgrade usage info. package getmodelsnapshotupgradestats @@ -371,7 +371,7 @@ func (r *GetModelSnapshotUpgradeStats) FilterPath(filterpaths ...string) *GetMod // 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 +// `"exists_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. diff --git a/typedapi/ml/getmodelsnapshotupgradestats/response.go b/typedapi/ml/getmodelsnapshotupgradestats/response.go index ee8ecbc25c..d91c79ac15 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getmodelsnapshotupgradestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getmodelsnapshotupgradestats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_model_snapshot_upgrade_stats/MlGetModelSnapshotUpgradeStatsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 157d5914f9..5a5f0447c4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get overall bucket results. // @@ -382,7 +382,7 @@ func (r *GetOverallBuckets) FilterPath(filterpaths ...string) *GetOverallBuckets // 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 +// `"exists_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. @@ -462,7 +462,7 @@ func (r *GetOverallBuckets) OverallScore(overallscore string) *GetOverallBuckets r.req = NewRequest() } - r.req.OverallScore = overallscore + r.req.OverallScore = &overallscore return r } diff --git a/typedapi/ml/getoverallbuckets/request.go b/typedapi/ml/getoverallbuckets/request.go index 273f5e6002..ba6bef836a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getoverallbuckets @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package getoverallbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_overall_buckets/MlGetOverallBucketsRequest.ts#L25-L153 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5dcdd72035..efc0f8bbbd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getoverallbuckets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getoverallbuckets // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_overall_buckets/MlGetOverallBucketsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0d92a39c3a..9cadbfe36c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get anomaly records for an anomaly detection job. // Records contain the detailed analytical results. They describe the anomalous @@ -377,7 +377,7 @@ func (r *GetRecords) FilterPath(filterpaths ...string) *GetRecords { // 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 +// `"exists_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. diff --git a/typedapi/ml/getrecords/request.go b/typedapi/ml/getrecords/request.go index 5e586ef845..fde4d2782f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getrecords @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package getrecords // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_records/MlGetAnomalyRecordsRequest.ts#L26-L135 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6eaf2fe81e..880fc1736f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getrecords @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrecords // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_records/MlGetAnomalyRecordsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 39193b65ef..8181529315 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get trained model configuration info. package gettrainedmodels @@ -406,7 +406,7 @@ func (r *GetTrainedModels) FilterPath(filterpaths ...string) *GetTrainedModels { // 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 +// `"exists_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. diff --git a/typedapi/ml/gettrainedmodels/response.go b/typedapi/ml/gettrainedmodels/response.go index 90f3e3f5a3..6a352bdc31 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package gettrainedmodels @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettrainedmodels // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_trained_models/MlGetTrainedModelResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8c8437a50f..e77f712d34 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get trained models usage info. // You can get usage information for multiple trained @@ -370,7 +370,7 @@ func (r *GetTrainedModelsStats) FilterPath(filterpaths ...string) *GetTrainedMod // 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 +// `"exists_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. diff --git a/typedapi/ml/gettrainedmodelsstats/response.go b/typedapi/ml/gettrainedmodelsstats/response.go index 74ee5ddfe7..3a05d54e5e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package gettrainedmodelsstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettrainedmodelsstats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_trained_models_stats/MlGetTrainedModelStatsResponse.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 66612ad224..7a58950ea6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Evaluate a trained model. package infertrainedmodel @@ -347,7 +347,7 @@ func (r *InferTrainedModel) FilterPath(filterpaths ...string) *InferTrainedModel // 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 +// `"exists_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. diff --git a/typedapi/ml/infertrainedmodel/request.go b/typedapi/ml/infertrainedmodel/request.go index 6c4f3efd87..fb5fff9125 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package infertrainedmodel @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package infertrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/infer_trained_model/MlInferTrainedModelRequest.ts#L27-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/infer_trained_model/MlInferTrainedModelRequest.ts#L27-L67 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 a278ff8a45..a44f15abae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package infertrainedmodel @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package infertrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/infer_trained_model/MlInferTrainedModelResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a954e1ba11..111188f5e6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get machine learning information. // Get defaults and limits used by machine learning. @@ -314,7 +314,7 @@ func (r *Info) FilterPath(filterpaths ...string) *Info { // 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 +// `"exists_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. diff --git a/typedapi/ml/info/response.go b/typedapi/ml/info/response.go index 1ee2c9b3fa..82e12b07f5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/info/MlInfoResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4172b36aff..a3426ab748 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Open anomaly detection jobs. // @@ -353,7 +353,7 @@ func (r *OpenJob) FilterPath(filterpaths ...string) *OpenJob { // 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 +// `"exists_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. diff --git a/typedapi/ml/openjob/request.go b/typedapi/ml/openjob/request.go index d11117a17c..ca8f266138 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package openjob @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package openjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/open_job/MlOpenJobRequest.ts#L24-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 994f719080..75b8e3efbf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package openjob // Response holds the response body struct for the package openjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/open_job/MlOpenJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4b8ad13b64..43b95048fb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Add scheduled events to the calendar. package postcalendarevents @@ -339,7 +339,7 @@ func (r *PostCalendarEvents) FilterPath(filterpaths ...string) *PostCalendarEven // 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 +// `"exists_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. diff --git a/typedapi/ml/postcalendarevents/request.go b/typedapi/ml/postcalendarevents/request.go index ec51595688..4f3b6a0bdb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package postcalendarevents @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package postcalendarevents // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/post_calendar_events/MlPostCalendarEventsRequest.ts#L24-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6e423e5d2c..381c98bf1d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package postcalendarevents @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package postcalendarevents // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/post_calendar_events/MlPostCalendarEventsResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 aac6ea4498..57ae45d68f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Send data to an anomaly detection job for analysis. // @@ -366,7 +366,7 @@ func (r *PostData) FilterPath(filterpaths ...string) *PostData { // 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 +// `"exists_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. diff --git a/typedapi/ml/postdata/request.go b/typedapi/ml/postdata/request.go index 22219c6bb4..60fabe223c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package postdata @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package postdata // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/post_data/MlPostJobDataRequest.ts#L24-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/post_data/MlPostJobDataRequest.ts#L24-L77 type Request = []json.RawMessage // NewRequest returns a Request diff --git a/typedapi/ml/postdata/response.go b/typedapi/ml/postdata/response.go index 386c865167..29cd52acb8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package postdata // Response holds the response body struct for the package postdata // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/post_data/MlPostJobDataResponse.ts#L24-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 43f4608f3c..998bb5abcd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Preview a datafeed. // This API returns the first "page" of search results from a datafeed. @@ -394,7 +394,7 @@ func (r *PreviewDatafeed) FilterPath(filterpaths ...string) *PreviewDatafeed { // 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 +// `"exists_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. diff --git a/typedapi/ml/previewdatafeed/request.go b/typedapi/ml/previewdatafeed/request.go index 6005ddfaf1..424b8f0181 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package previewdatafeed @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package previewdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/preview_datafeed/MlPreviewDatafeedRequest.ts#L26-L81 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 93d3e1f288..5873830cc8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package previewdatafeed @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package previewdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/preview_datafeed/MlPreviewDatafeedResponse.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dbebc43e2b..df345336fc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Preview features used by data frame analytics. // Preview the extracted features used by a data frame analytics config. @@ -352,7 +352,7 @@ func (r *PreviewDataFrameAnalytics) FilterPath(filterpaths ...string) *PreviewDa // 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 +// `"exists_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. diff --git a/typedapi/ml/previewdataframeanalytics/request.go b/typedapi/ml/previewdataframeanalytics/request.go index 1191957901..dc81dd6f16 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package previewdataframeanalytics @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package previewdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsRequest.ts#L24-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8a031b66ec..ea98007795 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package previewdataframeanalytics // Response holds the response body struct for the package previewdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/preview_data_frame_analytics/MlPreviewDataFrameAnalyticsResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ed442fa357..d077fb1b65 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a calendar. package putcalendar @@ -337,7 +337,7 @@ func (r *PutCalendar) FilterPath(filterpaths ...string) *PutCalendar { // 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 +// `"exists_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. diff --git a/typedapi/ml/putcalendar/request.go b/typedapi/ml/putcalendar/request.go index 8443a2cb81..ffc2c009f1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putcalendar @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package putcalendar // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_calendar/MlPutCalendarRequest.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6c905c88ec..2b018dc2f8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putcalendar @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package putcalendar // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_calendar/MlPutCalendarResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4a8084e4cc..31b7d774b5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Add anomaly detection job to calendar. package putcalendarjob @@ -346,7 +346,7 @@ func (r *PutCalendarJob) FilterPath(filterpaths ...string) *PutCalendarJob { // 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 +// `"exists_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. diff --git a/typedapi/ml/putcalendarjob/response.go b/typedapi/ml/putcalendarjob/response.go index d6a3568029..f075a84c8b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putcalendarjob @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package putcalendarjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_calendar_job/MlPutCalendarJobResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fbc5ca9bb5..e564038e82 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a datafeed. // Datafeeds retrieve data from Elasticsearch for analysis by an anomaly @@ -418,7 +418,7 @@ func (r *PutDatafeed) FilterPath(filterpaths ...string) *PutDatafeed { // 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 +// `"exists_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. diff --git a/typedapi/ml/putdatafeed/request.go b/typedapi/ml/putdatafeed/request.go index 992927330d..bda8a986e2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putdatafeed @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_datafeed/MlPutDatafeedRequest.ts#L37-L184 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 69da4449a1..bc13346b9a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putdatafeed @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_datafeed/MlPutDatafeedResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 01bd0531b3..7ff3b48b65 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a data frame analytics job. // This API creates a data frame analytics job that performs an analysis on the @@ -363,7 +363,7 @@ func (r *PutDataFrameAnalytics) FilterPath(filterpaths ...string) *PutDataFrameA // 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 +// `"exists_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. diff --git a/typedapi/ml/putdataframeanalytics/request.go b/typedapi/ml/putdataframeanalytics/request.go index d02d5242ee..53f66d8f67 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putdataframeanalytics @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsRequest.ts#L30-L155 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 14bfc11c2b..78cd40a76c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putdataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_data_frame_analytics/MlPutDataFrameAnalyticsResponse.ts#L31-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 33b88dfbc0..275bc4bae4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a filter. // A filter contains a list of strings. It can be used by one or more anomaly @@ -345,7 +345,7 @@ func (r *PutFilter) FilterPath(filterpaths ...string) *PutFilter { // 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 +// `"exists_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. diff --git a/typedapi/ml/putfilter/request.go b/typedapi/ml/putfilter/request.go index 94475662bc..491ead6e62 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putfilter @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package putfilter // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_filter/MlPutFilterRequest.ts#L23-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 639fe7879d..5ee23ff482 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putfilter // Response holds the response body struct for the package putfilter // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_filter/MlPutFilterResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5baca75e70..dfc46fe10e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -400,7 +391,7 @@ func (r *PutJob) FilterPath(filterpaths ...string) *PutJob { // 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 +// `"exists_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. diff --git a/typedapi/ml/putjob/request.go b/typedapi/ml/putjob/request.go index cbc5744c00..94182f7169 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putjob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_job/MlPutJobRequest.ts#L30-L157 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c4a6a2a4df..b22dabf634 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putjob @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_job/MlPutJobResponse.ts#L29-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2fba70217a..cafe9d8edd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a trained model. // Enable you to supply a trained model that is not created by data frame @@ -361,7 +361,7 @@ func (r *PutTrainedModel) FilterPath(filterpaths ...string) *PutTrainedModel { // 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 +// `"exists_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. diff --git a/typedapi/ml/puttrainedmodel/request.go b/typedapi/ml/puttrainedmodel/request.go index 709ff34884..40ab5be891 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puttrainedmodel @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package puttrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/MlPutTrainedModelRequest.ts#L31-L135 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0b1d67425e..8c0db1aa22 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puttrainedmodel @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package puttrainedmodel // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/MlPutTrainedModelResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/MlPutTrainedModelResponse.ts#L22-L25 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 809f2ce4b5..ea67adddd6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a trained model alias. // A trained model alias is a logical name used to reference a single trained @@ -393,7 +393,7 @@ func (r *PutTrainedModelAlias) FilterPath(filterpaths ...string) *PutTrainedMode // 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 +// `"exists_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. diff --git a/typedapi/ml/puttrainedmodelalias/response.go b/typedapi/ml/puttrainedmodelalias/response.go index 35cb651b54..d318b8c31b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puttrainedmodelalias // Response holds the response body struct for the package puttrainedmodelalias // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model_alias/MlPutTrainedModelAliasResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model_alias/MlPutTrainedModelAliasResponse.ts#L22-L25 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 7275f602f9..4bae4ba921 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create part of a trained model definition. package puttrainedmodeldefinitionpart @@ -362,7 +362,7 @@ func (r *PutTrainedModelDefinitionPart) FilterPath(filterpaths ...string) *PutTr // 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 +// `"exists_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. diff --git a/typedapi/ml/puttrainedmodeldefinitionpart/request.go b/typedapi/ml/puttrainedmodeldefinitionpart/request.go index 7d97fc27da..3cd6616a99 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puttrainedmodeldefinitionpart @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package puttrainedmodeldefinitionpart // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartRequest.ts#L24-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c6addaa278..84c2b4d180 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puttrainedmodeldefinitionpart // Response holds the response body struct for the package puttrainedmodeldefinitionpart // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model_definition_part/MlPutTrainedModelDefinitionPartResponse.ts#L22-L25 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 2ee78a4996..74abcd8738 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a trained model vocabulary. // This API is supported only for natural language processing (NLP) models. @@ -345,7 +345,7 @@ func (r *PutTrainedModelVocabulary) FilterPath(filterpaths ...string) *PutTraine // 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 +// `"exists_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. diff --git a/typedapi/ml/puttrainedmodelvocabulary/request.go b/typedapi/ml/puttrainedmodelvocabulary/request.go index 86548554fd..d0997052b2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puttrainedmodelvocabulary @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package puttrainedmodelvocabulary // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyRequest.ts#L24-L68 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 95869b41a2..58d3105247 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puttrainedmodelvocabulary // Response holds the response body struct for the package puttrainedmodelvocabulary // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model_vocabulary/MlPutTrainedModelVocabularyResponse.ts#L22-L25 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 c6cd94e64a..c828627056 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Reset an anomaly detection job. // All model state and results are deleted. The job is ready to start over as if @@ -353,7 +353,7 @@ func (r *ResetJob) FilterPath(filterpaths ...string) *ResetJob { // 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 +// `"exists_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. diff --git a/typedapi/ml/resetjob/response.go b/typedapi/ml/resetjob/response.go index ba99e8c252..03c3de022d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package resetjob // Response holds the response body struct for the package resetjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/reset_job/MlResetJobResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/reset_job/MlResetJobResponse.ts#L22-L25 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 ee5a80cfd8..fba132b59d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package revertmodelsnapshot @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package revertmodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/revert_model_snapshot/MlRevertModelSnapshotRequest.ts#L23-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a795989846..aa82cd87c9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package revertmodelsnapshot @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package revertmodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/revert_model_snapshot/MlRevertModelSnapshotResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cae5d20c2f..5ac1193b3f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Revert to a snapshot. // The machine learning features react quickly to anomalous input, learning new @@ -377,7 +377,7 @@ func (r *RevertModelSnapshot) FilterPath(filterpaths ...string) *RevertModelSnap // 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 +// `"exists_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. diff --git a/typedapi/ml/setupgrademode/response.go b/typedapi/ml/setupgrademode/response.go index 2b9111f0ab..6922b9e03a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package setupgrademode // Response holds the response body struct for the package setupgrademode // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/set_upgrade_mode/MlSetUpgradeModeResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/set_upgrade_mode/MlSetUpgradeModeResponse.ts#L22-L25 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 86116578e8..77835fa244 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Set upgrade_mode for ML indices. // Sets a cluster wide upgrade_mode setting that prepares machine learning @@ -342,7 +342,7 @@ func (r *SetUpgradeMode) FilterPath(filterpaths ...string) *SetUpgradeMode { // 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 +// `"exists_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. diff --git a/typedapi/ml/startdatafeed/request.go b/typedapi/ml/startdatafeed/request.go index 50287269e0..9755e2e55e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package startdatafeed @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package startdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/start_datafeed/MlStartDatafeedRequest.ts#L24-L99 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1244e3ae61..7b14fc90f2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package startdatafeed @@ -31,7 +31,7 @@ import ( // Response holds the response body struct for the package startdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/start_datafeed/MlStartDatafeedResponse.ts#L22-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ac68db77a2..85e12d6cb3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Start datafeeds. // @@ -381,7 +381,7 @@ func (r *StartDatafeed) FilterPath(filterpaths ...string) *StartDatafeed { // 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 +// `"exists_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. diff --git a/typedapi/ml/startdataframeanalytics/response.go b/typedapi/ml/startdataframeanalytics/response.go index f087e8b17c..9769590a8c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package startdataframeanalytics // Response holds the response body struct for the package startdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/start_data_frame_analytics/MlStartDataFrameAnalyticsResponse.ts#L22-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4a63297e2b..4e9c4d3678 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Start a data frame analytics job. // A data frame analytics job can be started and stopped multiple times @@ -366,7 +366,7 @@ func (r *StartDataFrameAnalytics) FilterPath(filterpaths ...string) *StartDataFr // 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 +// `"exists_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. diff --git a/typedapi/ml/starttrainedmodeldeployment/request.go b/typedapi/ml/starttrainedmodeldeployment/request.go index 66883dd2bc..ee1c9278fe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package starttrainedmodeldeployment @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package starttrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentRequest.ts#L30-L111 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b5d412debb..b81a3aa685 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package starttrainedmodeldeployment @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package starttrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/start_trained_model_deployment/MlStartTrainedModelDeploymentResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0f9c5f3ef2..d67aaae3a4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Start a trained model deployment. // It allocates the model to every machine learning node. @@ -433,7 +433,7 @@ func (r *StartTrainedModelDeployment) FilterPath(filterpaths ...string) *StartTr // 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 +// `"exists_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. diff --git a/typedapi/ml/stopdatafeed/request.go b/typedapi/ml/stopdatafeed/request.go index 3f6024bedf..3d6075bebf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stopdatafeed @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package stopdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/stop_datafeed/MlStopDatafeedRequest.ts#L24-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 663ee88ee4..73d1277c4e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stopdatafeed // Response holds the response body struct for the package stopdatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/stop_datafeed/MlStopDatafeedResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 20d88b9228..cb7ce5d0ff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Stop datafeeds. // A datafeed that is stopped ceases to retrieve data from Elasticsearch. A @@ -349,7 +349,7 @@ func (r *StopDatafeed) FilterPath(filterpaths ...string) *StopDatafeed { // 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 +// `"exists_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. diff --git a/typedapi/ml/stopdataframeanalytics/response.go b/typedapi/ml/stopdataframeanalytics/response.go index fdf4560f92..11bd938e2d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stopdataframeanalytics // Response holds the response body struct for the package stopdataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/stop_data_frame_analytics/MlStopDataFrameAnalyticsResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 36f3a3e553..80ce61c316 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Stop data frame analytics jobs. // A data frame analytics job can be started and stopped multiple times @@ -374,7 +374,7 @@ func (r *StopDataFrameAnalytics) FilterPath(filterpaths ...string) *StopDataFram // 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 +// `"exists_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. diff --git a/typedapi/ml/stoptrainedmodeldeployment/response.go b/typedapi/ml/stoptrainedmodeldeployment/response.go index c0df36af10..7c1630fadd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stoptrainedmodeldeployment // Response holds the response body struct for the package stoptrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/stop_trained_model_deployment/MlStopTrainedModelDeploymentResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 678da0ed4e..3690827f36 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Stop a trained model deployment. package stoptrainedmodeldeployment @@ -359,7 +359,7 @@ func (r *StopTrainedModelDeployment) FilterPath(filterpaths ...string) *StopTrai // 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 +// `"exists_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. diff --git a/typedapi/ml/updatedatafeed/request.go b/typedapi/ml/updatedatafeed/request.go index 0a8e3905dc..562553ab5b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatedatafeed @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package updatedatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/update_datafeed/MlUpdateDatafeedRequest.ts#L31-L170 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a8ac8a8ae0..0e2447d483 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatedatafeed @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatedatafeed // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/update_datafeed/MlUpdateDatafeedResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 81d4979ef1..487c0c586c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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{} @@ -405,7 +396,7 @@ func (r *UpdateDatafeed) FilterPath(filterpaths ...string) *UpdateDatafeed { // 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 +// `"exists_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. diff --git a/typedapi/ml/updatedataframeanalytics/request.go b/typedapi/ml/updatedataframeanalytics/request.go index 891177352b..791ad85bad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatedataframeanalytics @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatedataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsRequest.ts#L24-L80 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5b9885f66d..7c5703edf3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatedataframeanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatedataframeanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/update_data_frame_analytics/MlUpdateDataFrameAnalyticsResponse.ts#L30-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eba2c1e427..86dc621240 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update a data frame analytics job. package updatedataframeanalytics @@ -343,7 +343,7 @@ func (r *UpdateDataFrameAnalytics) FilterPath(filterpaths ...string) *UpdateData // 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 +// `"exists_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. diff --git a/typedapi/ml/updatefilter/request.go b/typedapi/ml/updatefilter/request.go index e33b629e0d..35c1bb7ccb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatefilter @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatefilter // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/update_filter/MlUpdateFilterRequest.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ed703531b8..f945ce7d83 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatefilter // Response holds the response body struct for the package updatefilter // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/update_filter/MlUpdateFilterResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e2f60aa02c..d44852da2f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update a filter. // Updates the description of a filter, adds items, or removes items from the @@ -343,7 +343,7 @@ func (r *UpdateFilter) FilterPath(filterpaths ...string) *UpdateFilter { // 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 +// `"exists_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. diff --git a/typedapi/ml/updatejob/request.go b/typedapi/ml/updatejob/request.go index f88ab3b227..00ee320f4d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatejob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package updatejob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/update_job/MlUpdateJobRequest.ts#L33-L147 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a4d27313ef..ffcdfb9e9f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatejob @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatejob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/update_job/MlUpdateJobResponse.ts#L29-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8c12eb384d..bd379b33be 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update an anomaly detection job. // Updates certain properties of an anomaly detection job. @@ -341,7 +341,7 @@ func (r *UpdateJob) FilterPath(filterpaths ...string) *UpdateJob { // 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 +// `"exists_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. diff --git a/typedapi/ml/updatemodelsnapshot/request.go b/typedapi/ml/updatemodelsnapshot/request.go index 46b54769eb..df23c8c3cd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatemodelsnapshot @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatemodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/update_model_snapshot/MlUpdateModelSnapshotRequest.ts#L23-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 03d59fda6a..5c4965cf32 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatemodelsnapshot @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatemodelsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/update_model_snapshot/MlUpdateModelSnapshotResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f1cdcb6526..9f9031a9bb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update a snapshot. // Updates certain properties of a snapshot. @@ -363,7 +363,7 @@ func (r *UpdateModelSnapshot) FilterPath(filterpaths ...string) *UpdateModelSnap // 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 +// `"exists_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. diff --git a/typedapi/ml/updatetrainedmodeldeployment/request.go b/typedapi/ml/updatetrainedmodeldeployment/request.go index 67dc4bcffa..8febf2deb0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatetrainedmodeldeployment @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatetrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentRequest.ts#L25-L78 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 79df67be70..ac7226efaa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatetrainedmodeldeployment @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatetrainedmodeldeployment // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/update_trained_model_deployment/MlUpdateTrainedModelDeploymentResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d2a0dfb3e3..99e7ebbeb2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update a trained model deployment. package updatetrainedmodeldeployment @@ -342,7 +342,7 @@ func (r *UpdateTrainedModelDeployment) FilterPath(filterpaths ...string) *Update // 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 +// `"exists_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. diff --git a/typedapi/ml/upgradejobsnapshot/response.go b/typedapi/ml/upgradejobsnapshot/response.go index 66f9201eb2..43abdd5a35 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package upgradejobsnapshot // Response holds the response body struct for the package upgradejobsnapshot // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/upgrade_job_snapshot/MlUpgradeJobSnapshotResponse.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ae29f5ac28..ac34bef10b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Upgrade a snapshot. // Upgrade an anomaly detection model snapshot to the latest major version. @@ -382,7 +382,7 @@ func (r *UpgradeJobSnapshot) FilterPath(filterpaths ...string) *UpgradeJobSnapsh // 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 +// `"exists_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. diff --git a/typedapi/ml/validate/request.go b/typedapi/ml/validate/request.go index ffb94ee9be..1b006f1dcb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package validate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package validate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/validate/MlValidateJobRequest.ts#L27-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bbdde4a31f..e258f90971 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package validate // Response holds the response body struct for the package validate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/validate/MlValidateJobResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/validate/MlValidateJobResponse.ts#L22-L25 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 5e7d62da14..590e7b79ca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Validate an anomaly detection job. package validate @@ -316,7 +316,7 @@ func (r *Validate) FilterPath(filterpaths ...string) *Validate { // 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 +// `"exists_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. diff --git a/typedapi/ml/validatedetector/request.go b/typedapi/ml/validatedetector/request.go index 2d2e1e68eb..6055371b78 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package validatedetector @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package validatedetector // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/validate_detector/MlValidateDetectorRequest.ts#L23-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3824fb2d8d..cf1ae97b69 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package validatedetector // Response holds the response body struct for the package validatedetector // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/validate_detector/MlValidateDetectorResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/validate_detector/MlValidateDetectorResponse.ts#L22-L25 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 a0a3a911a1..169006249d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Validate an anomaly detection job. package validatedetector @@ -319,7 +319,7 @@ func (r *ValidateDetector) FilterPath(filterpaths ...string) *ValidateDetector { // 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 +// `"exists_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. diff --git a/typedapi/monitoring/bulk/bulk.go b/typedapi/monitoring/bulk/bulk.go index 7694357fa8..fe7cbcbca0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Send monitoring data. // This API is used by the monitoring features to send monitoring data. @@ -372,7 +372,7 @@ func (r *Bulk) FilterPath(filterpaths ...string) *Bulk { // 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 +// `"exists_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. diff --git a/typedapi/monitoring/bulk/request.go b/typedapi/monitoring/bulk/request.go index e0b56f3e66..860c420d5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package bulk // Request holds the request body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/monitoring/bulk/BulkMonitoringRequest.ts#L24-L73 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e8da18a711..64195cb17a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package bulk @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulk // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/monitoring/bulk/BulkMonitoringResponse.ts#L23-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 580df7ced1..2121268e38 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clear the archived repositories metering. // Clear the archived repositories metering information in the cluster. @@ -345,7 +345,7 @@ func (r *ClearRepositoriesMeteringArchive) FilterPath(filterpaths ...string) *Cl // 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 +// `"exists_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. diff --git a/typedapi/nodes/clearrepositoriesmeteringarchive/response.go b/typedapi/nodes/clearrepositoriesmeteringarchive/response.go index 7a489a79bd..b09572a6e1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clearrepositoriesmeteringarchive @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearrepositoriesmeteringarchive // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveResponse.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/clear_repositories_metering_archive/ClearRepositoriesMeteringArchiveResponse.ts#L37-L40 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 1c85487879..e9f5955241 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get cluster repositories metering. // Get repositories metering information for a cluster. @@ -335,7 +335,7 @@ func (r *GetRepositoriesMeteringInfo) FilterPath(filterpaths ...string) *GetRepo // 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 +// `"exists_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. diff --git a/typedapi/nodes/getrepositoriesmeteringinfo/response.go b/typedapi/nodes/getrepositoriesmeteringinfo/response.go index 4af889d4aa..51397b9629 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getrepositoriesmeteringinfo @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrepositoriesmeteringinfo // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/get_repositories_metering_info/GetRepositoriesMeteringInfoResponse.ts#L36-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/get_repositories_metering_info/GetRepositoriesMeteringInfoResponse.ts#L36-L39 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 f5bbcb7996..c4ac263033 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the hot threads for nodes. // Get a breakdown of the hot threads on each selected node in the cluster. @@ -393,7 +393,7 @@ func (r *HotThreads) FilterPath(filterpaths ...string) *HotThreads { // 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 +// `"exists_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. diff --git a/typedapi/nodes/hotthreads/response.go b/typedapi/nodes/hotthreads/response.go index 6687a2d5fc..a06008b55e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package hotthreads // Response holds the response body struct for the package hotthreads // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/hot_threads/NodesHotThreadsResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 65bb87fe48..782bce3185 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get node information. // @@ -388,7 +388,7 @@ func (r *Info) FilterPath(filterpaths ...string) *Info { // 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 +// `"exists_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. diff --git a/typedapi/nodes/info/response.go b/typedapi/nodes/info/response.go index 646182dd2a..c4004268a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/NodesInfoResponse.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/info/NodesInfoResponse.ts#L30-L33 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 5dc0677605..ccd277f461 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Reload the keystore on nodes in the cluster. // @@ -386,7 +386,7 @@ func (r *ReloadSecureSettings) FilterPath(filterpaths ...string) *ReloadSecureSe // 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 +// `"exists_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. diff --git a/typedapi/nodes/reloadsecuresettings/request.go b/typedapi/nodes/reloadsecuresettings/request.go index 9fb7ff08e3..04b4c4d24d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package reloadsecuresettings @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package reloadsecuresettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/reload_secure_settings/ReloadSecureSettingsRequest.ts#L24-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 031826a6ea..099b2b0a79 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package reloadsecuresettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package reloadsecuresettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/reload_secure_settings/ReloadSecureSettingsResponse.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/reload_secure_settings/ReloadSecureSettingsResponse.ts#L30-L33 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 cbd1c52a92..cc5fef9162 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/stats/NodesStatsResponse.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/stats/NodesStatsResponse.ts#L30-L33 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 691474e941..8e82221333 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get node statistics. // Get statistics for nodes in a cluster. @@ -519,7 +519,7 @@ func (r *Stats) FilterPath(filterpaths ...string) *Stats { // 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 +// `"exists_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. diff --git a/typedapi/nodes/usage/response.go b/typedapi/nodes/usage/response.go index 5f32324903..026b2732ee 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package usage @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package usage // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/usage/NodesUsageResponse.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/nodes/usage/NodesUsageResponse.ts#L30-L33 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 4bc61390a8..fd14c81230 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get feature usage information. package usage @@ -385,7 +385,7 @@ func (r *Usage) FilterPath(filterpaths ...string) *Usage { // 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 +// `"exists_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. diff --git a/typedapi/profiling/flamegraph/flamegraph.go b/typedapi/profiling/flamegraph/flamegraph.go index 8334e9033b..27410bb940 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 1123568e73..9e07ba1709 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Extracts raw stacktrace information from Universal Profiling. package stacktraces diff --git a/typedapi/profiling/status/status.go b/typedapi/profiling/status/status.go index a05b16c88d..55bcc2565a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 29a8b831da..e6595052a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 af02de1683..6c464b8940 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a query rule. // Delete a query rule within a query ruleset. @@ -350,7 +350,7 @@ func (r *DeleteRule) FilterPath(filterpaths ...string) *DeleteRule { // 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 +// `"exists_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. diff --git a/typedapi/queryrules/deleterule/response.go b/typedapi/queryrules/deleterule/response.go index 80f8555da4..d0bf9125e3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleterule // Response holds the response body struct for the package deleterule // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/delete_rule/QueryRuleDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/delete_rule/QueryRuleDeleteResponse.ts#L22-L25 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 e661394954..1338556aff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a query ruleset. // Remove a query ruleset and its associated data. @@ -325,7 +325,7 @@ func (r *DeleteRuleset) FilterPath(filterpaths ...string) *DeleteRuleset { // 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 +// `"exists_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. diff --git a/typedapi/queryrules/deleteruleset/response.go b/typedapi/queryrules/deleteruleset/response.go index 60a9ef8d0e..23687fec3f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleteruleset // Response holds the response body struct for the package deleteruleset // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/delete_ruleset/QueryRulesetDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/delete_ruleset/QueryRulesetDeleteResponse.ts#L22-L25 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 d54a96bf32..8af122ae7a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get a query rule. // Get details about a query rule within a query ruleset. @@ -346,7 +346,7 @@ func (r *GetRule) FilterPath(filterpaths ...string) *GetRule { // 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 +// `"exists_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. diff --git a/typedapi/queryrules/getrule/response.go b/typedapi/queryrules/getrule/response.go index fe91a7d4da..7f2bee7012 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getrule @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package getrule // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/get_rule/QueryRuleGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/get_rule/QueryRuleGetResponse.ts#L22-L25 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 5f6d533243..b6ed5049fd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get a query ruleset. // Get details about a query ruleset. @@ -323,7 +323,7 @@ func (r *GetRuleset) FilterPath(filterpaths ...string) *GetRuleset { // 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 +// `"exists_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. diff --git a/typedapi/queryrules/getruleset/response.go b/typedapi/queryrules/getruleset/response.go index 0e1d0cf93a..10e662c9ed 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getruleset @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getruleset // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/get_ruleset/QueryRulesetGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/query_rules/get_ruleset/QueryRulesetGetResponse.ts#L22-L25 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 fd0439be27..ba76238b35 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get all query rulesets. // Get summarized information about the query rulesets. @@ -316,7 +316,7 @@ func (r *ListRulesets) FilterPath(filterpaths ...string) *ListRulesets { // 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 +// `"exists_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. diff --git a/typedapi/queryrules/listrulesets/response.go b/typedapi/queryrules/listrulesets/response.go index 97deb34bf0..3c4b19322f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package listrulesets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package listrulesets // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/list_rulesets/QueryRulesetListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 aefdc232f7..bcd9b91b4e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a query rule. // Create or update a query rule within a query ruleset. @@ -376,7 +376,7 @@ func (r *PutRule) FilterPath(filterpaths ...string) *PutRule { // 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 +// `"exists_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. diff --git a/typedapi/queryrules/putrule/request.go b/typedapi/queryrules/putrule/request.go index a190ca874e..64a289f0db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putrule @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package putrule // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/put_rule/QueryRulePutRequest.ts#L28-L79 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c00d1ac273..bd25403ac5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putrule @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putrule // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/put_rule/QueryRulePutResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8587f234fc..24072d5846 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a query ruleset. // There is a limit of 100 rules per ruleset. @@ -355,7 +355,7 @@ func (r *PutRuleset) FilterPath(filterpaths ...string) *PutRuleset { // 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 +// `"exists_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. diff --git a/typedapi/queryrules/putruleset/request.go b/typedapi/queryrules/putruleset/request.go index 7e0b7e2c12..71a214a981 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putruleset @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package putruleset // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/put_ruleset/QueryRulesetPutRequest.ts#L23-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5710b361db..2c594d227a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putruleset @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putruleset // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/put_ruleset/QueryRulesetPutResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6ee94888e7..b92dde3c87 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package test @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package test // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/test/QueryRulesetTestRequest.ts#L24-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c1f217c280..26b49236a7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package test @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package test // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/test/QueryRulesetTestResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4cf09aafbe..1ae6424a5d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Test a query ruleset. // Evaluate match criteria against a query ruleset to identify the rules that @@ -341,7 +341,7 @@ func (r *Test) FilterPath(filterpaths ...string) *Test { // 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 +// `"exists_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. diff --git a/typedapi/rollup/deletejob/delete_job.go b/typedapi/rollup/deletejob/delete_job.go index 8830c98c1c..f2adeeab9f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a rollup job. // @@ -383,7 +383,7 @@ func (r *DeleteJob) FilterPath(filterpaths ...string) *DeleteJob { // 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 +// `"exists_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. diff --git a/typedapi/rollup/deletejob/response.go b/typedapi/rollup/deletejob/response.go index 358eb52a32..556f7ec65f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletejob @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deletejob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/delete_job/DeleteRollupJobResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e65b0ce28f..d87486a1d2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get rollup job information. // Get the configuration, stats, and status of rollup jobs. @@ -343,7 +343,7 @@ func (r *GetJobs) FilterPath(filterpaths ...string) *GetJobs { // 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 +// `"exists_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. diff --git a/typedapi/rollup/getjobs/response.go b/typedapi/rollup/getjobs/response.go index 83ecb160d9..2399a360be 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getjobs @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getjobs // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_jobs/GetRollupJobResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6ad555feca..8a780e3262 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the rollup job capabilities. // Get the capabilities of any rollup jobs that have been configured for a @@ -353,7 +353,7 @@ func (r *GetRollupCaps) FilterPath(filterpaths ...string) *GetRollupCaps { // 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 +// `"exists_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. diff --git a/typedapi/rollup/getrollupcaps/response.go b/typedapi/rollup/getrollupcaps/response.go index f1423c9799..2d8f242d40 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getrollupcaps @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrollupcaps // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_rollup_caps/GetRollupCapabilitiesResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 aacaba5bfc..973ecdcc68 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the rollup index capabilities. // Get the rollup capabilities of all jobs inside of a rollup index. @@ -340,7 +340,7 @@ func (r *GetRollupIndexCaps) FilterPath(filterpaths ...string) *GetRollupIndexCa // 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 +// `"exists_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. diff --git a/typedapi/rollup/getrollupindexcaps/response.go b/typedapi/rollup/getrollupindexcaps/response.go index b44f924f6a..4f8cfa2e5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getrollupindexcaps @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrollupindexcaps // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_rollup_index_caps/GetRollupIndexCapabilitiesResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c492ab2fe3..5c3bc5492f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a rollup job. // @@ -377,7 +377,7 @@ func (r *PutJob) FilterPath(filterpaths ...string) *PutJob { // 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 +// `"exists_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. diff --git a/typedapi/rollup/putjob/request.go b/typedapi/rollup/putjob/request.go index ab6f4d3032..dd3d7e176c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putjob @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/put_job/CreateRollupJobRequest.ts#L27-L105 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 774f1d648c..569c68a5bc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putjob // Response holds the response body struct for the package putjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/put_job/CreateRollupJobResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/put_job/CreateRollupJobResponse.ts#L22-L25 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 fff946a7ee..e16f40c7fc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package rollupsearch @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package rollupsearch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/rollup_search/RollupSearchRequest.ts#L27-L109 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/rollup/rollup_search/RollupSearchRequest.ts#L27-L86 type Request struct { // Aggregations Specifies aggregations. diff --git a/typedapi/rollup/rollupsearch/response.go b/typedapi/rollup/rollupsearch/response.go index 00bcfeb2e1..1d1144b4d5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package rollupsearch @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package rollupsearch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/rollup_search/RollupSearchResponse.ts#L27-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c6f5a4dc2f..7154cce2a4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Search rolled-up data. // The rollup search endpoint is needed because, internally, rolled-up documents @@ -33,37 +33,9 @@ // `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. +// For more detailed examples of using the rollup search API, including querying +// rolled-up data only or combining rolled-up and live data, refer to the +// External documentation. package rollupsearch import ( @@ -141,37 +113,9 @@ func NewRollupSearchFunc(tp elastictransport.Interface) NewRollupSearch { // `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. +// For more detailed examples of using the rollup search API, including querying +// rolled-up data only or combining rolled-up and live data, refer to the +// External documentation. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-rollup-rollup-search func New(tp elastictransport.Interface) *RollupSearch { @@ -457,7 +401,7 @@ func (r *RollupSearch) FilterPath(filterpaths ...string) *RollupSearch { // 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 +// `"exists_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. diff --git a/typedapi/rollup/startjob/response.go b/typedapi/rollup/startjob/response.go index 1cf150f388..5534b6f5d1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package startjob // Response holds the response body struct for the package startjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/start_job/StartRollupJobResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 04aa6d6fd5..57e6fea840 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Start rollup jobs. // If you try to start a job that does not exist, an exception occurs. @@ -329,7 +329,7 @@ func (r *StartJob) FilterPath(filterpaths ...string) *StartJob { // 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 +// `"exists_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. diff --git a/typedapi/rollup/stopjob/response.go b/typedapi/rollup/stopjob/response.go index 0f524cc5b4..724ec92644 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stopjob // Response holds the response body struct for the package stopjob // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/stop_job/StopRollupJobResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d0bdf83c06..e8cd6772fb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Stop rollup jobs. // If you try to stop a job that does not exist, an exception occurs. @@ -380,7 +380,7 @@ func (r *StopJob) FilterPath(filterpaths ...string) *StopJob { // 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 +// `"exists_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. diff --git a/typedapi/searchablesnapshots/cachestats/cache_stats.go b/typedapi/searchablesnapshots/cachestats/cache_stats.go index 700d40d46f..36e81b0602 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get cache statistics. // Get statistics about the shared cache for partially mounted indices. @@ -341,7 +341,7 @@ func (r *CacheStats) FilterPath(filterpaths ...string) *CacheStats { // 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 +// `"exists_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. diff --git a/typedapi/searchablesnapshots/cachestats/response.go b/typedapi/searchablesnapshots/cachestats/response.go index 27928415fa..fb152a264b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package cachestats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package cachestats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/searchable_snapshots/cache_stats/Response.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 094410677c..28f1b319b6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clear the cache. // Clear indices and data streams from the shared cache for partially mounted @@ -370,7 +370,7 @@ func (r *ClearCache) FilterPath(filterpaths ...string) *ClearCache { // 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 +// `"exists_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. diff --git a/typedapi/searchablesnapshots/clearcache/response.go b/typedapi/searchablesnapshots/clearcache/response.go index 8dbe6f35e7..57f6bca0aa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clearcache @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcache // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/searchable_snapshots/clear_cache/SearchableSnapshotsClearCacheResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1229838bfe..3480edab84 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Mount a snapshot. // Mount a snapshot as a searchable snapshot index. @@ -392,7 +392,7 @@ func (r *Mount) FilterPath(filterpaths ...string) *Mount { // 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 +// `"exists_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. diff --git a/typedapi/searchablesnapshots/mount/request.go b/typedapi/searchablesnapshots/mount/request.go index d3bdb1019f..07cdf6d9c1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package mount @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package mount // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/searchable_snapshots/mount/SearchableSnapshotsMountRequest.ts#L26-L92 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9e6034d8e3..0d56567561 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package mount @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package mount // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/searchable_snapshots/mount/SearchableSnapshotsMountResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 14b620b208..2d946eca61 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/searchable_snapshots/stats/SearchableSnapshotsStatsResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a420b76c7e..04d77ac1d0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get searchable snapshot statistics. package stats @@ -338,7 +338,7 @@ func (r *Stats) FilterPath(filterpaths ...string) *Stats { // 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 +// `"exists_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. diff --git a/typedapi/searchapplication/delete/delete.go b/typedapi/searchapplication/delete/delete.go index f5b07f8b8a..68cb8efa52 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a search application. // @@ -329,7 +329,7 @@ func (r *Delete) FilterPath(filterpaths ...string) *Delete { // 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 +// `"exists_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. diff --git a/typedapi/searchapplication/delete/response.go b/typedapi/searchapplication/delete/response.go index a538803b57..7ce3326ef0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/delete/SearchApplicationsDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/delete/SearchApplicationsDeleteResponse.ts#L22-L25 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 5297c30344..9635d88251 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a behavioral analytics collection. // The associated data stream is also deleted. @@ -325,7 +325,7 @@ func (r *DeleteBehavioralAnalytics) FilterPath(filterpaths ...string) *DeleteBeh // 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 +// `"exists_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. diff --git a/typedapi/searchapplication/deletebehavioralanalytics/response.go b/typedapi/searchapplication/deletebehavioralanalytics/response.go index d9ae7f6939..c14930606b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletebehavioralanalytics // Response holds the response body struct for the package deletebehavioralanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/delete_behavioral_analytics/BehavioralAnalyticsDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/delete_behavioral_analytics/BehavioralAnalyticsDeleteResponse.ts#L22-L25 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 11954dd3dc..d6f5f50b29 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get search application details. package get @@ -323,7 +323,7 @@ func (r *Get) FilterPath(filterpaths ...string) *Get { // 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 +// `"exists_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. diff --git a/typedapi/searchapplication/get/response.go b/typedapi/searchapplication/get/response.go index 08e48a57d1..86722a7da3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/get/SearchApplicationsGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/get/SearchApplicationsGetResponse.ts#L22-L25 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 73e55945e2..e446fcfafd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get behavioral analytics collections. package getbehavioralanalytics @@ -328,7 +328,7 @@ func (r *GetBehavioralAnalytics) FilterPath(filterpaths ...string) *GetBehaviora // 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 +// `"exists_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. diff --git a/typedapi/searchapplication/getbehavioralanalytics/response.go b/typedapi/searchapplication/getbehavioralanalytics/response.go index 0e7dd885dc..9965a8ec64 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getbehavioralanalytics @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getbehavioralanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/get_behavioral_analytics/BehavioralAnalyticsGetResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 82c9f0094e..718b9a4696 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get search applications. // Get information about search applications. @@ -326,7 +326,7 @@ func (r *List) FilterPath(filterpaths ...string) *List { // 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 +// `"exists_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. diff --git a/typedapi/searchapplication/list/response.go b/typedapi/searchapplication/list/response.go index d698856ed7..8b940408b2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package list @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package list // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/list/SearchApplicationsListResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5bc22aeb99..709daa2892 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 { @@ -410,7 +376,7 @@ func (r *PostBehavioralAnalyticsEvent) FilterPath(filterpaths ...string) *PostBe // 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 +// `"exists_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. diff --git a/typedapi/searchapplication/postbehavioralanalyticsevent/request.go b/typedapi/searchapplication/postbehavioralanalyticsevent/request.go index 3638f902f4..1772d58704 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package postbehavioralanalyticsevent @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package postbehavioralanalyticsevent // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostRequest.ts#L24-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostRequest.ts#L24-L58 type Request = json.RawMessage // NewRequest returns a Request diff --git a/typedapi/searchapplication/postbehavioralanalyticsevent/response.go b/typedapi/searchapplication/postbehavioralanalyticsevent/response.go index 430a381bdf..c46edac2b6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package postbehavioralanalyticsevent @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package postbehavioralanalyticsevent // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/post_behavioral_analytics_event/BehavioralAnalyticsEventPostResponse.ts#L22-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 482565f8d2..0538cf2811 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a search application. package put @@ -346,7 +346,7 @@ func (r *Put) FilterPath(filterpaths ...string) *Put { // 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 +// `"exists_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. diff --git a/typedapi/searchapplication/put/request.go b/typedapi/searchapplication/put/request.go index e7b0a6dc97..70ee79ca0a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package put @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/put/SearchApplicationsPutRequest.ts#L23-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ae19d2b5e8..4fa0a37c38 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package put @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package put // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/put/SearchApplicationsPutResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 25d960234c..42b0c91e5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a behavioral analytics collection. package putbehavioralanalytics @@ -323,7 +323,7 @@ func (r *PutBehavioralAnalytics) FilterPath(filterpaths ...string) *PutBehaviora // 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 +// `"exists_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. diff --git a/typedapi/searchapplication/putbehavioralanalytics/response.go b/typedapi/searchapplication/putbehavioralanalytics/response.go index db4f46ee46..23eb9b21e7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putbehavioralanalytics // Response holds the response body struct for the package putbehavioralanalytics // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/put_behavioral_analytics/BehavioralAnalyticsPutResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/put_behavioral_analytics/BehavioralAnalyticsPutResponse.ts#L23-L26 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 39ac66a889..2d406d40a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Render a search application query. // Generate an Elasticsearch query using the specified query parameters and the @@ -359,7 +359,7 @@ func (r *RenderQuery) FilterPath(filterpaths ...string) *RenderQuery { // 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 +// `"exists_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. diff --git a/typedapi/searchapplication/renderquery/request.go b/typedapi/searchapplication/renderquery/request.go index 5427197c80..8a3fa66a69 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package renderquery @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package renderquery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/render_query/SearchApplicationsRenderQueryRequest.ts#L24-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6922615ffa..1bf6b8f7ca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package renderquery // Response holds the response body struct for the package renderquery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/render_query/SearchApplicationsRenderQueryResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 433aaf47fc..92a749ce1c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package search @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/search/SearchApplicationsSearchRequest.ts#L24-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e047fba27a..0b1e39e247 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package search @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package search // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/search/SearchApplicationsSearchResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/search/SearchApplicationsSearchResponse.ts#L22-L25 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 8e2dea7cfb..1782cd3e39 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run a search application search. // Generate and run an Elasticsearch query that uses the specified query @@ -360,7 +360,7 @@ func (r *Search) FilterPath(filterpaths ...string) *Search { // 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 +// `"exists_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. diff --git a/typedapi/security/activateuserprofile/activate_user_profile.go b/typedapi/security/activateuserprofile/activate_user_profile.go index bec745a82c..94f8ee05b4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Activate a user profile. // @@ -363,7 +363,7 @@ func (r *ActivateUserProfile) FilterPath(filterpaths ...string) *ActivateUserPro // 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 +// `"exists_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. diff --git a/typedapi/security/activateuserprofile/request.go b/typedapi/security/activateuserprofile/request.go index 12a790b935..112c627f3c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package activateuserprofile @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package activateuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/activate_user_profile/Request.ts#L23-L76 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8bf587873d..c41ebbbdd8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package activateuserprofile @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package activateuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/activate_user_profile/Response.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/activate_user_profile/Response.ts#L22-L25 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 027c94dbc3..2efc5c1875 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Authenticate a user. // @@ -318,7 +318,7 @@ func (r *Authenticate) FilterPath(filterpaths ...string) *Authenticate { // 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 +// `"exists_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. diff --git a/typedapi/security/authenticate/response.go b/typedapi/security/authenticate/response.go index f4f46915c4..2ea69fdc86 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package authenticate @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package authenticate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/authenticate/SecurityAuthenticateResponse.ts#L24-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4ee90ff2fe..f3f4463a57 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Bulk delete roles. // @@ -335,7 +335,7 @@ func (r *BulkDeleteRole) FilterPath(filterpaths ...string) *BulkDeleteRole { // 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 +// `"exists_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. diff --git a/typedapi/security/bulkdeleterole/request.go b/typedapi/security/bulkdeleterole/request.go index 9a6fcb8461..efcee09501 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package bulkdeleterole @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package bulkdeleterole // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/bulk_delete_role/SecurityBulkDeleteRoleRequest.ts#L23-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bf1e124101..ba5efd3224 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package bulkdeleterole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulkdeleterole // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/bulk_delete_role/SecurityBulkDeleteRoleResponse.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cb4140ce82..668fb272ea 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Bulk create or update roles. // @@ -335,7 +335,7 @@ func (r *BulkPutRole) FilterPath(filterpaths ...string) *BulkPutRole { // 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 +// `"exists_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. diff --git a/typedapi/security/bulkputrole/request.go b/typedapi/security/bulkputrole/request.go index 0f93f49dfb..458cccaa50 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package bulkputrole @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package bulkputrole // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/bulk_put_role/SecurityBulkPutRoleRequest.ts#L25-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 639da0f97e..780732e3b9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package bulkputrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulkputrole // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/bulk_put_role/SecurityBulkPutRoleResponse.ts#L22-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 632d09347d..6357b4bc88 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Bulk update API keys. // Update the attributes for multiple API keys. @@ -370,7 +370,7 @@ func (r *BulkUpdateApiKeys) FilterPath(filterpaths ...string) *BulkUpdateApiKeys // 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 +// `"exists_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. diff --git a/typedapi/security/bulkupdateapikeys/request.go b/typedapi/security/bulkupdateapikeys/request.go index 2b6973e43b..65e64dd3db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package bulkupdateapikeys @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package bulkupdateapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/bulk_update_api_keys/SecurityBulkUpdateApiKeysRequest.ts#L26-L83 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a75be31683..2f2ad4cdf8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package bulkupdateapikeys @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package bulkupdateapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/bulk_update_api_keys/SecurityBulkUpdateApiKeysResponse.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 09d9e19592..f7cbb09322 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Change passwords. // @@ -362,7 +362,7 @@ func (r *ChangePassword) FilterPath(filterpaths ...string) *ChangePassword { // 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 +// `"exists_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. diff --git a/typedapi/security/changepassword/request.go b/typedapi/security/changepassword/request.go index 59daca2b92..acd3a242ae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package changepassword @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package changepassword // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/change_password/SecurityChangePasswordRequest.ts#L23-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6f056615ab..cdbb8310ee 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package changepassword // Response holds the response body struct for the package changepassword // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/change_password/SecurityChangePasswordResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 acb0e4092d..511a464681 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clear the API key cache. // @@ -335,7 +335,7 @@ func (r *ClearApiKeyCache) FilterPath(filterpaths ...string) *ClearApiKeyCache { // 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 +// `"exists_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. diff --git a/typedapi/security/clearapikeycache/response.go b/typedapi/security/clearapikeycache/response.go index 232a8384f7..59fcea5b53 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clearapikeycache @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearapikeycache // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/clear_api_key_cache/SecurityClearApiKeyCacheResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dd0079330d..a530b431f7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clear the privileges cache. // @@ -335,7 +335,7 @@ func (r *ClearCachedPrivileges) FilterPath(filterpaths ...string) *ClearCachedPr // 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 +// `"exists_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. diff --git a/typedapi/security/clearcachedprivileges/response.go b/typedapi/security/clearcachedprivileges/response.go index b98e00138a..7895a85a00 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clearcachedprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/clear_cached_privileges/SecurityClearCachedPrivilegesResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a10fbc2b9c..8203258110 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clear the user cache. // @@ -359,7 +359,7 @@ func (r *ClearCachedRealms) FilterPath(filterpaths ...string) *ClearCachedRealms // 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 +// `"exists_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. diff --git a/typedapi/security/clearcachedrealms/response.go b/typedapi/security/clearcachedrealms/response.go index a1cccb7e5b..7d32f3186b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clearcachedrealms @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedrealms // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/clear_cached_realms/SecurityClearCachedRealmsResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 063045f4d1..977cf439c5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clear the roles cache. // @@ -331,7 +331,7 @@ func (r *ClearCachedRoles) FilterPath(filterpaths ...string) *ClearCachedRoles { // 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 +// `"exists_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. diff --git a/typedapi/security/clearcachedroles/response.go b/typedapi/security/clearcachedroles/response.go index ffea6d2c68..b7651b5b6d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clearcachedroles @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedroles // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/clear_cached_roles/ClearCachedRolesResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 23279ca4ed..14f04e8c10 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clear service account token caches. // @@ -394,7 +394,7 @@ func (r *ClearCachedServiceTokens) FilterPath(filterpaths ...string) *ClearCache // 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 +// `"exists_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. diff --git a/typedapi/security/clearcachedservicetokens/response.go b/typedapi/security/clearcachedservicetokens/response.go index 02e963e5ff..392b40192a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clearcachedservicetokens @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package clearcachedservicetokens // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/clear_cached_service_tokens/ClearCachedServiceTokensResponse.ts#L25-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e7516a43ff..149b1afc8a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create an API key. // @@ -363,7 +363,7 @@ func (r *CreateApiKey) FilterPath(filterpaths ...string) *CreateApiKey { // 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 +// `"exists_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. diff --git a/typedapi/security/createapikey/request.go b/typedapi/security/createapikey/request.go index b62c92648a..c60cbb7dbb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package createapikey @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package createapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/create_api_key/SecurityCreateApiKeyRequest.ts#L26-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fdce2d9066..7122deb9ea 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package createapikey // Response holds the response body struct for the package createapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/create_api_key/SecurityCreateApiKeyResponse.ts#L23-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 17e5918d29..033063f586 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a cross-cluster API key. // @@ -372,7 +372,7 @@ func (r *CreateCrossClusterApiKey) FilterPath(filterpaths ...string) *CreateCros // 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 +// `"exists_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. diff --git a/typedapi/security/createcrossclusterapikey/request.go b/typedapi/security/createcrossclusterapikey/request.go index e95b056c46..fb46d668b9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package createcrossclusterapikey @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package createcrossclusterapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/create_cross_cluster_api_key/CreateCrossClusterApiKeyRequest.ts#L25-L80 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1988a3317d..f374c0b8e3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package createcrossclusterapikey // Response holds the response body struct for the package createcrossclusterapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/create_cross_cluster_api_key/CreateCrossClusterApiKeyResponse.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d8a31a1a20..a032eccafe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a service account token. // @@ -422,7 +422,7 @@ func (r *CreateServiceToken) FilterPath(filterpaths ...string) *CreateServiceTok // 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 +// `"exists_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. diff --git a/typedapi/security/createservicetoken/response.go b/typedapi/security/createservicetoken/response.go index 274a0d96ac..ede966979a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package createservicetoken @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package createservicetoken // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/create_service_token/CreateServiceTokenResponse.ts#L22-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 404bdd4af9..d1cea47312 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delegate PKI authentication. // @@ -348,7 +348,7 @@ func (r *DelegatePki) FilterPath(filterpaths ...string) *DelegatePki { // 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 +// `"exists_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. diff --git a/typedapi/security/delegatepki/request.go b/typedapi/security/delegatepki/request.go index 02abc15792..98c508850c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package delegatepki @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package delegatepki // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/delegate_pki/SecurityDelegatePkiRequest.ts#L22-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4e9244a3ef..ca22fd48f4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package delegatepki @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package delegatepki // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L24-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 63c59e96d4..b309163068 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete application privileges. // @@ -369,7 +369,7 @@ func (r *DeletePrivileges) FilterPath(filterpaths ...string) *DeletePrivileges { // 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 +// `"exists_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. diff --git a/typedapi/security/deleteprivileges/response.go b/typedapi/security/deleteprivileges/response.go index 40be93a588..1436073916 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleteprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deleteprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/delete_privileges/SecurityDeletePrivilegesResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 93dbb6de25..e254bf8e37 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete roles. // @@ -344,7 +344,7 @@ func (r *DeleteRole) FilterPath(filterpaths ...string) *DeleteRole { // 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 +// `"exists_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. diff --git a/typedapi/security/deleterole/response.go b/typedapi/security/deleterole/response.go index 068b2ba95b..f765c8ef52 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleterole // Response holds the response body struct for the package deleterole // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/delete_role/SecurityDeleteRoleResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2b7e335645..c18cc5583e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete role mappings. // @@ -348,7 +348,7 @@ func (r *DeleteRoleMapping) FilterPath(filterpaths ...string) *DeleteRoleMapping // 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 +// `"exists_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. diff --git a/typedapi/security/deleterolemapping/response.go b/typedapi/security/deleterolemapping/response.go index 64854ca167..2145bfc3f9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleterolemapping // Response holds the response body struct for the package deleterolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/delete_role_mapping/SecurityDeleteRoleMappingResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 af1eae0f8e..5fe0d7980e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete service account tokens. // @@ -382,7 +382,7 @@ func (r *DeleteServiceToken) FilterPath(filterpaths ...string) *DeleteServiceTok // 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 +// `"exists_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. diff --git a/typedapi/security/deleteservicetoken/response.go b/typedapi/security/deleteservicetoken/response.go index 9772446b37..a2eefbae32 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleteservicetoken // Response holds the response body struct for the package deleteservicetoken // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/delete_service_token/DeleteServiceTokenResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4254348b8e..95ea594348 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete users. // @@ -338,7 +338,7 @@ func (r *DeleteUser) FilterPath(filterpaths ...string) *DeleteUser { // 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 +// `"exists_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. diff --git a/typedapi/security/deleteuser/response.go b/typedapi/security/deleteuser/response.go index 756442e55f..768d8f2927 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleteuser // Response holds the response body struct for the package deleteuser // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/delete_user/SecurityDeleteUserResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eedc754f3e..7480849fb0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Disable users. // @@ -344,7 +344,7 @@ func (r *DisableUser) FilterPath(filterpaths ...string) *DisableUser { // 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 +// `"exists_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. diff --git a/typedapi/security/disableuser/response.go b/typedapi/security/disableuser/response.go index 7a87138e65..bce70f19c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package disableuser // Response holds the response body struct for the package disableuser // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/disable_user/SecurityDisableUserResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 084a1ef23b..02ce4864b2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Disable a user profile. // @@ -364,7 +364,7 @@ func (r *DisableUserProfile) FilterPath(filterpaths ...string) *DisableUserProfi // 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 +// `"exists_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. diff --git a/typedapi/security/disableuserprofile/response.go b/typedapi/security/disableuserprofile/response.go index 1e5d041fd6..ba87dcc98e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package disableuserprofile // Response holds the response body struct for the package disableuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/disable_user_profile/Response.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/disable_user_profile/Response.ts#L22-L25 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 bc2b640072..8f6b5d5506 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Enable users. // @@ -342,7 +342,7 @@ func (r *EnableUser) FilterPath(filterpaths ...string) *EnableUser { // 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 +// `"exists_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. diff --git a/typedapi/security/enableuser/response.go b/typedapi/security/enableuser/response.go index be97367b89..6f2e204cfb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package enableuser // Response holds the response body struct for the package enableuser // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/enable_user/SecurityEnableUserResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 50b3996930..d341160e9c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Enable a user profile. // @@ -364,7 +364,7 @@ func (r *EnableUserProfile) FilterPath(filterpaths ...string) *EnableUserProfile // 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 +// `"exists_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. diff --git a/typedapi/security/enableuserprofile/response.go b/typedapi/security/enableuserprofile/response.go index 55dba29675..18765828c5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package enableuserprofile // Response holds the response body struct for the package enableuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/enable_user_profile/Response.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/enable_user_profile/Response.ts#L22-L25 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 2c6b0de6a8..c39be36a2c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Enroll Kibana. // @@ -322,7 +322,7 @@ func (r *EnrollKibana) FilterPath(filterpaths ...string) *EnrollKibana { // 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 +// `"exists_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. diff --git a/typedapi/security/enrollkibana/response.go b/typedapi/security/enrollkibana/response.go index 0d794e5db3..0200e3a895 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package enrollkibana @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package enrollkibana // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/enroll_kibana/Response.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5defcf9da0..a465d3dc28 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Enroll a node. // @@ -328,7 +328,7 @@ func (r *EnrollNode) FilterPath(filterpaths ...string) *EnrollNode { // 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 +// `"exists_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. diff --git a/typedapi/security/enrollnode/response.go b/typedapi/security/enrollnode/response.go index cdf307845e..8f13b003e9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package enrollnode // Response holds the response body struct for the package enrollnode // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/enroll_node/Response.ts#L20-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4d31bfcb2a..30cb0e8d7d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get API key information. // @@ -397,7 +397,7 @@ func (r *GetApiKey) FilterPath(filterpaths ...string) *GetApiKey { // 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 +// `"exists_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. diff --git a/typedapi/security/getapikey/response.go b/typedapi/security/getapikey/response.go index 40ad69d063..d36117d1af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getapikey @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_api_key/SecurityGetApiKeyResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5dff272dea..22ab3d28f9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get builtin privileges. // @@ -308,7 +308,7 @@ func (r *GetBuiltinPrivileges) FilterPath(filterpaths ...string) *GetBuiltinPriv // 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 +// `"exists_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. diff --git a/typedapi/security/getbuiltinprivileges/response.go b/typedapi/security/getbuiltinprivileges/response.go index 95649a99a9..c7c99e9dd8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getbuiltinprivileges @@ -27,7 +27,7 @@ import ( // Response holds the response body struct for the package getbuiltinprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_builtin_privileges/SecurityGetBuiltinPrivilegesResponse.ts#L26-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b4fed88640..3bf05d94fb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get application privileges. // @@ -378,7 +378,7 @@ func (r *GetPrivileges) FilterPath(filterpaths ...string) *GetPrivileges { // 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 +// `"exists_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. diff --git a/typedapi/security/getprivileges/response.go b/typedapi/security/getprivileges/response.go index c9e825e591..f594284c43 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_privileges/SecurityGetPrivilegesResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bf4cd8ff24..5d8c7b3db2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get roles. // @@ -341,7 +341,7 @@ func (r *GetRole) FilterPath(filterpaths ...string) *GetRole { // 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 +// `"exists_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. diff --git a/typedapi/security/getrole/response.go b/typedapi/security/getrole/response.go index a2f5f8f945..c232decec1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrole // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_role/SecurityGetRoleResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5c8747b6fe..3edb056fe0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get role mappings. // @@ -344,7 +344,7 @@ func (r *GetRoleMapping) FilterPath(filterpaths ...string) *GetRoleMapping { // 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 +// `"exists_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. diff --git a/typedapi/security/getrolemapping/response.go b/typedapi/security/getrolemapping/response.go index b62b2585e9..52bcfde785 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getrolemapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getrolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_role_mapping/SecurityGetRoleMappingResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6d553c5a5d..853b692f13 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get service accounts. // @@ -373,7 +373,7 @@ func (r *GetServiceAccounts) FilterPath(filterpaths ...string) *GetServiceAccoun // 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 +// `"exists_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. diff --git a/typedapi/security/getserviceaccounts/response.go b/typedapi/security/getserviceaccounts/response.go index 0fa350461f..84b70c59de 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getserviceaccounts @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getserviceaccounts // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_service_accounts/GetServiceAccountsResponse.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b90b870daa..748a235835 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get service account credentials. // @@ -371,7 +371,7 @@ func (r *GetServiceCredentials) FilterPath(filterpaths ...string) *GetServiceCre // 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 +// `"exists_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. diff --git a/typedapi/security/getservicecredentials/response.go b/typedapi/security/getservicecredentials/response.go index c83412d4f8..084cdf099f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getservicecredentials @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getservicecredentials // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_service_credentials/GetServiceCredentialsResponse.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 862d2e213f..8f8ee27626 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get security index settings. // @@ -334,7 +334,7 @@ func (r *GetSettings) FilterPath(filterpaths ...string) *GetSettings { // 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 +// `"exists_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. diff --git a/typedapi/security/getsettings/response.go b/typedapi/security/getsettings/response.go index 392dd51479..fe5931be7e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_settings/SecurityGetSettingsResponse.ts#L21-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 625468c13d..1939c399b4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get a token. // @@ -361,7 +361,7 @@ func (r *GetToken) FilterPath(filterpaths ...string) *GetToken { // 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 +// `"exists_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. diff --git a/typedapi/security/gettoken/request.go b/typedapi/security/gettoken/request.go index 769bd6fd84..f696a77f20 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package gettoken @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package gettoken // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_token/GetUserAccessTokenRequest.ts#L25-L90 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ac66b05ca8..3dd88e8b46 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package gettoken @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettoken // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_token/GetUserAccessTokenResponse.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e48b87b700..655e295f9d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get users. // @@ -343,7 +343,7 @@ func (r *GetUser) FilterPath(filterpaths ...string) *GetUser { // 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 +// `"exists_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. diff --git a/typedapi/security/getuser/response.go b/typedapi/security/getuser/response.go index cb0ee420e8..757dfe666e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getuser @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getuser // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_user/SecurityGetUserResponse.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8bd7d49027..b71b7aa6dc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 @@ -340,7 +314,7 @@ func (r *GetUserPrivileges) FilterPath(filterpaths ...string) *GetUserPrivileges // 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 +// `"exists_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. diff --git a/typedapi/security/getuserprivileges/response.go b/typedapi/security/getuserprivileges/response.go index 9b9d50dbe8..df6a9a85bf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getuserprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getuserprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_user_privileges/SecurityGetUserPrivilegesResponse.ts#L28-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 591d23503e..25f3f5f99c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get a user profile. // @@ -356,7 +356,7 @@ func (r *GetUserProfile) FilterPath(filterpaths ...string) *GetUserProfile { // 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 +// `"exists_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. diff --git a/typedapi/security/getuserprofile/response.go b/typedapi/security/getuserprofile/response.go index 6ce32e75b5..0b0f8c0afe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getuserprofile @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_user_profile/Response.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 11e0b82c61..3e9474cab3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Grant an API key. // @@ -67,6 +67,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/apikeygranttype" + "github.com/elastic/go-elasticsearch/v9/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 @@ -379,7 +392,7 @@ func (r *GrantApiKey) FilterPath(filterpaths ...string) *GrantApiKey { // 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 +// `"exists_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. diff --git a/typedapi/security/grantapikey/request.go b/typedapi/security/grantapikey/request.go index 9fd9b5b63a..d0fb1d4ed8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package grantapikey @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package grantapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/grant_api_key/SecurityGrantApiKeyRequest.ts#L24-L92 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 13e2d61c6b..e5e205a75e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package grantapikey // Response holds the response body struct for the package grantapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/grant_api_key/SecurityGrantApiKeyResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6d4a3fd566..9e29a7e070 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Check user privileges. // @@ -355,7 +355,7 @@ func (r *HasPrivileges) FilterPath(filterpaths ...string) *HasPrivileges { // 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 +// `"exists_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. diff --git a/typedapi/security/hasprivileges/request.go b/typedapi/security/hasprivileges/request.go index 696182a484..ae50dbd464 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package hasprivileges @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package hasprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/has_privileges/SecurityHasPrivilegesRequest.ts#L25-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d85e3edbd2..bc5093db52 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package hasprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package hasprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/has_privileges/SecurityHasPrivilegesResponse.ts#L24-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 aebd374549..4c6394280a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Check user profile privileges. // @@ -334,7 +334,7 @@ func (r *HasPrivilegesUserProfile) FilterPath(filterpaths ...string) *HasPrivile // 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 +// `"exists_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. diff --git a/typedapi/security/hasprivilegesuserprofile/request.go b/typedapi/security/hasprivilegesuserprofile/request.go index 390826ca2c..1ae6113b58 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package hasprivilegesuserprofile @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package hasprivilegesuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/has_privileges_user_profile/Request.ts#L24-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f770a760f7..eeeed51733 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package hasprivilegesuserprofile @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package hasprivilegesuserprofile // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/has_privileges_user_profile/Response.ts#L23-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f98f9f5c68..7c122f302d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Invalidate API keys. // @@ -358,7 +358,7 @@ func (r *InvalidateApiKey) FilterPath(filterpaths ...string) *InvalidateApiKey { // 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 +// `"exists_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. diff --git a/typedapi/security/invalidateapikey/request.go b/typedapi/security/invalidateapikey/request.go index 79734b0e7e..6cb600a207 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package invalidateapikey @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package invalidateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/invalidate_api_key/SecurityInvalidateApiKeyRequest.ts#L23-L82 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7e7df7e9f5..1c3bd0ffc4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package invalidateapikey @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package invalidateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/invalidate_api_key/SecurityInvalidateApiKeyResponse.ts#L23-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4bac77f3b7..5735d1fbd8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Invalidate a token. // @@ -350,7 +350,7 @@ func (r *InvalidateToken) FilterPath(filterpaths ...string) *InvalidateToken { // 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 +// `"exists_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. diff --git a/typedapi/security/invalidatetoken/request.go b/typedapi/security/invalidatetoken/request.go index d3a848a101..ce68c658ef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package invalidatetoken @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package invalidatetoken // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/invalidate_token/SecurityInvalidateTokenRequest.ts#L23-L71 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c18684dc6f..78b234d8a9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package invalidatetoken @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package invalidatetoken // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/invalidate_token/SecurityInvalidateTokenResponse.ts#L23-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 64e5d8ea11..9b16a6f3a7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Authenticate OpenID Connect. // @@ -336,7 +336,7 @@ func (r *OidcAuthenticate) FilterPath(filterpaths ...string) *OidcAuthenticate { // 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 +// `"exists_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. diff --git a/typedapi/security/oidcauthenticate/request.go b/typedapi/security/oidcauthenticate/request.go index 825cfdc8e4..35ebb098a9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package oidcauthenticate @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package oidcauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/oidc_authenticate/Request.ts#L22-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2714ed9c50..adb6e98ea0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package oidcauthenticate // Response holds the response body struct for the package oidcauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/oidc_authenticate/Response.ts#L22-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1478961f8e..414bca3cee 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Logout of OpenID Connect. // @@ -344,7 +344,7 @@ func (r *OidcLogout) FilterPath(filterpaths ...string) *OidcLogout { // 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 +// `"exists_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. diff --git a/typedapi/security/oidclogout/request.go b/typedapi/security/oidclogout/request.go index 6c52c07e19..6f694ce8bf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package oidclogout @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package oidclogout // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/oidc_logout/Request.ts#L22-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8bb4af3635..32307ca536 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package oidclogout // Response holds the response body struct for the package oidclogout // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/oidc_logout/Response.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b525a029d3..bf4bc4018d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Prepare OpenID connect authentication. // @@ -342,7 +342,7 @@ func (r *OidcPrepareAuthentication) FilterPath(filterpaths ...string) *OidcPrepa // 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 +// `"exists_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. diff --git a/typedapi/security/oidcprepareauthentication/request.go b/typedapi/security/oidcprepareauthentication/request.go index f85342c63f..d731f38750 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package oidcprepareauthentication @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package oidcprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/oidc_prepare_authentication/Request.ts#L22-L71 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2d5e7d2922..90211c244e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package oidcprepareauthentication // Response holds the response body struct for the package oidcprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/oidc_prepare_authentication/Response.ts#L20-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3cd5dd90f0..248f319a8d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update application privileges. // @@ -373,7 +373,7 @@ func (r *PutPrivileges) FilterPath(filterpaths ...string) *PutPrivileges { // 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 +// `"exists_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. diff --git a/typedapi/security/putprivileges/request.go b/typedapi/security/putprivileges/request.go index 09dad67681..ea4bca51f7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putprivileges @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package putprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/put_privileges/SecurityPutPrivilegesRequest.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4e8be92ec7..4acf8e0dad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putprivileges @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putprivileges // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/put_privileges/SecurityPutPrivilegesResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d1f94164ba..db2bb76e9b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update roles. // @@ -364,7 +364,7 @@ func (r *PutRole) FilterPath(filterpaths ...string) *PutRole { // 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 +// `"exists_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. diff --git a/typedapi/security/putrole/request.go b/typedapi/security/putrole/request.go index aa13c23b58..975ca1afd0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putrole @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package putrole // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/put_role/SecurityPutRoleRequest.ts#L32-L111 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5e3a942585..d2e6372977 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putrole // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/put_role/SecurityPutRoleResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f15115654f..7941488b45 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update role mappings. // @@ -426,7 +426,7 @@ func (r *PutRoleMapping) FilterPath(filterpaths ...string) *PutRoleMapping { // 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 +// `"exists_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. diff --git a/typedapi/security/putrolemapping/request.go b/typedapi/security/putrolemapping/request.go index 7b6337486b..b178bb4b84 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putrolemapping @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putrolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/put_role_mapping/SecurityPutRoleMappingRequest.ts#L25-L103 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fb535ddfe2..c7e808d556 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putrolemapping @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package putrolemapping // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/put_role_mapping/SecurityPutRoleMappingResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 00fd80708a..f19d183470 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update users. // @@ -365,7 +365,7 @@ func (r *PutUser) FilterPath(filterpaths ...string) *PutUser { // 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 +// `"exists_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. diff --git a/typedapi/security/putuser/request.go b/typedapi/security/putuser/request.go index c270e42e95..ab12c68c52 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putuser @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putuser // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/put_user/SecurityPutUserRequest.ts#L23-L101 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c95a5bf696..bc3c2f59a1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putuser // Response holds the response body struct for the package putuser // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/put_user/SecurityPutUserResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b3930893a9..02f34b19cf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Find API keys with a query. // @@ -30,6 +30,7 @@ // If you have the `read_security`, `manage_api_key`, or greater privileges // (including `manage_security`), this API returns all API keys regardless of // ownership. +// Refer to the linked documentation for examples of how to find API keys: package queryapikeys import ( @@ -96,6 +97,7 @@ func NewQueryApiKeysFunc(tp elastictransport.Interface) NewQueryApiKeys { // If you have the `read_security`, `manage_api_key`, or greater privileges // (including `manage_security`), this API returns all API keys regardless of // ownership. +// Refer to the linked documentation for examples of how to find API keys: // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-query-api-keys func New(tp elastictransport.Interface) *QueryApiKeys { @@ -374,7 +376,7 @@ func (r *QueryApiKeys) FilterPath(filterpaths ...string) *QueryApiKeys { // 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 +// `"exists_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. diff --git a/typedapi/security/queryapikeys/request.go b/typedapi/security/queryapikeys/request.go index 3cf49dcf93..6c0a0ce912 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package queryapikeys @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package queryapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_api_keys/QueryApiKeysRequest.ts#L26-L124 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_api_keys/QueryApiKeysRequest.ts#L26-L126 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 ce88b455cf..42f5cb3868 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package queryapikeys @@ -34,7 +34,7 @@ import ( // Response holds the response body struct for the package queryapikeys // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_api_keys/QueryApiKeysResponse.ts#L26-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ea101bd5d9..053de07e93 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Find roles with a query. // @@ -332,7 +332,7 @@ func (r *QueryRole) FilterPath(filterpaths ...string) *QueryRole { // 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 +// `"exists_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. diff --git a/typedapi/security/queryrole/request.go b/typedapi/security/queryrole/request.go index d3649d448c..d679490dd1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package queryrole @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package queryrole // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_role/QueryRolesRequest.ts#L25-L85 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cd3bd599be..dbbd01fb69 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package queryrole @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package queryrole // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_role/QueryRolesResponse.ts#L23-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ff959b98c6..2b548a1f51 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Find users with a query. // @@ -339,7 +339,7 @@ func (r *QueryUser) FilterPath(filterpaths ...string) *QueryUser { // 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 +// `"exists_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. diff --git a/typedapi/security/queryuser/request.go b/typedapi/security/queryuser/request.go index 5f01b0ffdb..5327978f5c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package queryuser @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package queryuser // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_user/SecurityQueryUserRequest.ts#L25-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dcf7ada502..95a7482bd5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package queryuser @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package queryuser // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_user/SecurityQueryUserResponse.ts#L23-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8f213c6945..836768ccda 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package samlauthenticate @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package samlauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/saml_authenticate/Request.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a3ffc5293d..4faba4562e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package samlauthenticate // Response holds the response body struct for the package samlauthenticate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/saml_authenticate/Response.ts#L22-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1d9ccf5443..590af2757c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Authenticate SAML. // @@ -364,7 +364,7 @@ func (r *SamlAuthenticate) FilterPath(filterpaths ...string) *SamlAuthenticate { // 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 +// `"exists_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. diff --git a/typedapi/security/samlcompletelogout/request.go b/typedapi/security/samlcompletelogout/request.go index 5f9865ea12..a5b5c43ca2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package samlcompletelogout @@ -31,7 +31,7 @@ import ( // Request holds the request body struct for the package samlcompletelogout // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/saml_complete_logout/Request.ts#L23-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 70e12687af..b5f797d211 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Logout of SAML completely. // @@ -295,7 +295,7 @@ func (r *SamlCompleteLogout) FilterPath(filterpaths ...string) *SamlCompleteLogo // 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 +// `"exists_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. diff --git a/typedapi/security/samlinvalidate/request.go b/typedapi/security/samlinvalidate/request.go index c4817f695f..20959bd671 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package samlinvalidate @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package samlinvalidate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/saml_invalidate/Request.ts#L22-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 085f971ba4..f02f7ec613 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package samlinvalidate // Response holds the response body struct for the package samlinvalidate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/saml_invalidate/Response.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8b90bb50d6..cb45112151 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Invalidate SAML. // @@ -348,7 +348,7 @@ func (r *SamlInvalidate) FilterPath(filterpaths ...string) *SamlInvalidate { // 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 +// `"exists_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. diff --git a/typedapi/security/samllogout/request.go b/typedapi/security/samllogout/request.go index 1d52b4991c..3cb8fda942 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package samllogout @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package samllogout // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/saml_logout/Request.ts#L22-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 494775d0e2..e8e70faaf9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package samllogout // Response holds the response body struct for the package samllogout // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/saml_logout/Response.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8ad27f3e02..3ef393b8f6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Logout of SAML. // @@ -344,7 +344,7 @@ func (r *SamlLogout) FilterPath(filterpaths ...string) *SamlLogout { // 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 +// `"exists_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. diff --git a/typedapi/security/samlprepareauthentication/request.go b/typedapi/security/samlprepareauthentication/request.go index b6e30ba8a5..feb53fea17 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package samlprepareauthentication @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package samlprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/saml_prepare_authentication/Request.ts#L22-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 31bbf7d48f..8520c48ee5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package samlprepareauthentication // Response holds the response body struct for the package samlprepareauthentication // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/saml_prepare_authentication/Response.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0c1ed7ac00..72edb4aedb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Prepare SAML authentication. // @@ -360,7 +360,7 @@ func (r *SamlPrepareAuthentication) FilterPath(filterpaths ...string) *SamlPrepa // 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 +// `"exists_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. diff --git a/typedapi/security/samlserviceprovidermetadata/response.go b/typedapi/security/samlserviceprovidermetadata/response.go index 8afb254c00..77494c4d06 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package samlserviceprovidermetadata // Response holds the response body struct for the package samlserviceprovidermetadata // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/saml_service_provider_metadata/Response.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eb76d01350..dded854eff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create SAML service provider metadata. // @@ -345,7 +345,7 @@ func (r *SamlServiceProviderMetadata) FilterPath(filterpaths ...string) *SamlSer // 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 +// `"exists_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. diff --git a/typedapi/security/suggestuserprofiles/request.go b/typedapi/security/suggestuserprofiles/request.go index af267d9c51..b47a8d2df1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package suggestuserprofiles @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package suggestuserprofiles // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/suggest_user_profiles/Request.ts#L24-L81 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5f51da249e..ab046ec6cb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package suggestuserprofiles @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package suggestuserprofiles // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/suggest_user_profiles/Response.ts#L29-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cd68875153..a6d90843f4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Suggest a user profile. // @@ -332,7 +332,7 @@ func (r *SuggestUserProfiles) FilterPath(filterpaths ...string) *SuggestUserProf // 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 +// `"exists_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. diff --git a/typedapi/security/updateapikey/request.go b/typedapi/security/updateapikey/request.go index da745f42a3..3a70c27421 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateapikey @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package updateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/update_api_key/Request.ts#L26-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e1e79b78cc..8f11649dfd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateapikey // Response holds the response body struct for the package updateapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/update_api_key/Response.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f744ddde6a..1428d04204 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update an API key. // @@ -401,7 +401,7 @@ func (r *UpdateApiKey) FilterPath(filterpaths ...string) *UpdateApiKey { // 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 +// `"exists_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. diff --git a/typedapi/security/updatecrossclusterapikey/request.go b/typedapi/security/updatecrossclusterapikey/request.go index d5cfa3f10a..aaa43ff12b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatecrossclusterapikey @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package updatecrossclusterapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyRequest.ts#L25-L83 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyRequest.ts#L25-L85 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 64bb94c060..0611abf87c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatecrossclusterapikey // Response holds the response body struct for the package updatecrossclusterapikey // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/update_cross_cluster_api_key/UpdateCrossClusterApiKeyResponse.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 25eb99df6e..05f754b00b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update a cross-cluster API key. // @@ -43,6 +43,10 @@ // // NOTE: This API cannot update REST API keys, which should be updated by either // the update API key or bulk update API keys API. +// +// To learn more about how to use this API, refer to the [Update cross cluter +// API key API examples +// page](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-cc-api-key-examples). package updatecrossclusterapikey import ( @@ -131,6 +135,10 @@ func NewUpdateCrossClusterApiKeyFunc(tp elastictransport.Interface) NewUpdateCro // NOTE: This API cannot update REST API keys, which should be updated by either // the update API key or bulk update API keys API. // +// To learn more about how to use this API, refer to the [Update cross cluter +// API key API examples +// page](https://www.elastic.co/docs/reference/elasticsearch/rest-apis/update-cc-api-key-examples). +// // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-security-update-cross-cluster-api-key func New(tp elastictransport.Interface) *UpdateCrossClusterApiKey { r := &UpdateCrossClusterApiKey{ @@ -387,7 +395,7 @@ func (r *UpdateCrossClusterApiKey) FilterPath(filterpaths ...string) *UpdateCros // 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 +// `"exists_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. diff --git a/typedapi/security/updatesettings/request.go b/typedapi/security/updatesettings/request.go index 0e6221a4ee..46fcbf775f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatesettings @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package updatesettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/update_settings/SecurityUpdateSettingsRequest.ts#L24-L71 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d456bc5134..f912818f20 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatesettings // Response holds the response body struct for the package updatesettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/update_settings/SecurityUpdateSettingsResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cbe8c68d9f..fe9f3bd737 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update security index settings. // @@ -360,7 +360,7 @@ func (r *UpdateSettings) FilterPath(filterpaths ...string) *UpdateSettings { // 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 +// `"exists_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. diff --git a/typedapi/security/updateuserprofiledata/request.go b/typedapi/security/updateuserprofiledata/request.go index 3fae000768..4f4390bc7f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateuserprofiledata @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updateuserprofiledata // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/update_user_profile_data/Request.ts#L27-L98 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1620477c1a..09dd1b0919 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updateuserprofiledata // Response holds the response body struct for the package updateuserprofiledata // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/update_user_profile_data/Response.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/update_user_profile_data/Response.ts#L22-L25 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 7e5edcfeee..cbcefd8602 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update user profile data. // @@ -416,7 +416,7 @@ func (r *UpdateUserProfileData) FilterPath(filterpaths ...string) *UpdateUserPro // 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 +// `"exists_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. diff --git a/typedapi/shutdown/deletenode/delete_node.go b/typedapi/shutdown/deletenode/delete_node.go index f781e91a1c..113f7de583 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Cancel node shutdown preparations. // Remove a node from the shutdown list so it can resume normal operations. @@ -370,7 +370,7 @@ func (r *DeleteNode) FilterPath(filterpaths ...string) *DeleteNode { // 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 +// `"exists_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. diff --git a/typedapi/shutdown/deletenode/response.go b/typedapi/shutdown/deletenode/response.go index cb5b355953..29cc85b334 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletenode // Response holds the response body struct for the package deletenode // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/shutdown/delete_node/ShutdownDeleteNodeResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/delete_node/ShutdownDeleteNodeResponse.ts#L22-L25 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 576a651958..cdffcad2b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the shutdown status. // @@ -366,7 +366,7 @@ func (r *GetNode) FilterPath(filterpaths ...string) *GetNode { // 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 +// `"exists_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. diff --git a/typedapi/shutdown/getnode/response.go b/typedapi/shutdown/getnode/response.go index 22bee289d6..4e68ae5834 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getnode @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getnode // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 178982188c..ef06933da2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Prepare a node to be shut down. // @@ -408,7 +408,7 @@ func (r *PutNode) FilterPath(filterpaths ...string) *PutNode { // 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 +// `"exists_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. diff --git a/typedapi/shutdown/putnode/request.go b/typedapi/shutdown/putnode/request.go index 6ae91340f2..04abcabf9a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putnode @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package putnode // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/shutdown/put_node/ShutdownPutNodeRequest.ts#L25-L108 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dddb09804e..cd548c89b5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putnode // Response holds the response body struct for the package putnode // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/shutdown/put_node/ShutdownPutNodeResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/shutdown/put_node/ShutdownPutNodeResponse.ts#L22-L25 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 e66c00dd99..c38e3f07d0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Simulate data ingestion. // Run ingest pipelines against a set of provided documents, optionally with @@ -420,7 +420,7 @@ func (r *Ingest) FilterPath(filterpaths ...string) *Ingest { // 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 +// `"exists_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. diff --git a/typedapi/simulate/ingest/request.go b/typedapi/simulate/ingest/request.go index bdacd33601..a514b627b1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package ingest @@ -29,7 +29,7 @@ import ( // Request holds the request body struct for the package ingest // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/simulate/ingest/SimulateIngestRequest.ts#L29-L100 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 df7f85b0bc..0019baf100 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package ingest @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package ingest // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/simulate/ingest/SimulateIngestResponse.ts#L27-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 38213f907b..0781a5bb87 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a policy. // Delete a snapshot lifecycle policy definition. @@ -349,7 +349,7 @@ func (r *DeleteLifecycle) FilterPath(filterpaths ...string) *DeleteLifecycle { // 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 +// `"exists_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. diff --git a/typedapi/slm/deletelifecycle/response.go b/typedapi/slm/deletelifecycle/response.go index 5c44bdec27..7d92af3f90 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletelifecycle // Response holds the response body struct for the package deletelifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/delete_lifecycle/DeleteSnapshotLifecycleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/delete_lifecycle/DeleteSnapshotLifecycleResponse.ts#L22-L25 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 ef3c270c84..8f008b1aa5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run a policy. // Immediately create a snapshot according to the snapshot lifecycle policy @@ -355,7 +355,7 @@ func (r *ExecuteLifecycle) FilterPath(filterpaths ...string) *ExecuteLifecycle { // 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 +// `"exists_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. diff --git a/typedapi/slm/executelifecycle/response.go b/typedapi/slm/executelifecycle/response.go index 4bb45b8328..66373ad965 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package executelifecycle // Response holds the response body struct for the package executelifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/execute_lifecycle/ExecuteSnapshotLifecycleResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9c3d8bea52..4e73350fcc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run a retention policy. // Manually apply the retention policy to force immediate removal of snapshots @@ -326,7 +326,7 @@ func (r *ExecuteRetention) FilterPath(filterpaths ...string) *ExecuteRetention { // 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 +// `"exists_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. diff --git a/typedapi/slm/executeretention/response.go b/typedapi/slm/executeretention/response.go index 82ec217c1f..520e102b12 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package executeretention // Response holds the response body struct for the package executeretention // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/execute_retention/ExecuteRetentionResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/execute_retention/ExecuteRetentionResponse.ts#L22-L25 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 1fdfa1f185..092708c16f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get policy information. // Get snapshot lifecycle policy definitions and information about the latest @@ -352,7 +352,7 @@ func (r *GetLifecycle) FilterPath(filterpaths ...string) *GetLifecycle { // 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 +// `"exists_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. diff --git a/typedapi/slm/getlifecycle/response.go b/typedapi/slm/getlifecycle/response.go index bfe309d6e4..c40af1dd68 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getlifecycle @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/get_lifecycle/GetSnapshotLifecycleResponse.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 56a1d04603..586c7ef89f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get snapshot lifecycle management statistics. // Get global and policy-level statistics about actions taken by snapshot @@ -322,7 +322,7 @@ func (r *GetStats) FilterPath(filterpaths ...string) *GetStats { // 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 +// `"exists_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. diff --git a/typedapi/slm/getstats/response.go b/typedapi/slm/getstats/response.go index 1e85f0843b..2903adfe5d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getstats @@ -26,18 +26,18 @@ import ( // Response holds the response body struct for the package getstats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/get_stats/GetSnapshotLifecycleStatsResponse.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7156ae4f90..3dee2b2bd9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the snapshot lifecycle management status. package getstatus @@ -322,7 +322,7 @@ func (r *GetStatus) FilterPath(filterpaths ...string) *GetStatus { // 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 +// `"exists_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. diff --git a/typedapi/slm/getstatus/response.go b/typedapi/slm/getstatus/response.go index e3377bf6b4..204e48d61f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getstatus @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getstatus // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/get_status/GetSnapshotLifecycleManagementStatusResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6af4403af3..a4ef41afdf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a policy. // Create or update a snapshot lifecycle policy. @@ -366,7 +366,7 @@ func (r *PutLifecycle) FilterPath(filterpaths ...string) *PutLifecycle { // 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 +// `"exists_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. diff --git a/typedapi/slm/putlifecycle/request.go b/typedapi/slm/putlifecycle/request.go index 0add510780..1085e015cd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putlifecycle @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/put_lifecycle/PutSnapshotLifecycleRequest.ts#L26-L89 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f3360b499a..1294a82866 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putlifecycle // Response holds the response body struct for the package putlifecycle // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/put_lifecycle/PutSnapshotLifecycleResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/put_lifecycle/PutSnapshotLifecycleResponse.ts#L22-L25 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 a81ce0a2dd..565a2fcc08 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package start // Response holds the response body struct for the package start // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/start/StartSnapshotLifecycleManagementResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/start/StartSnapshotLifecycleManagementResponse.ts#L22-L25 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 17cc592826..7b0aa11054 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Start snapshot lifecycle management. // Snapshot lifecycle management (SLM) starts automatically when a cluster is @@ -330,7 +330,7 @@ func (r *Start) FilterPath(filterpaths ...string) *Start { // 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 +// `"exists_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. diff --git a/typedapi/slm/stop/response.go b/typedapi/slm/stop/response.go index 8699723c48..5ec0b58931 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stop // Response holds the response body struct for the package stop // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/stop/StopSnapshotLifecycleManagementResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/slm/stop/StopSnapshotLifecycleManagementResponse.ts#L22-L25 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 09e6c52e8e..a30d6b4f5c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Stop snapshot lifecycle management. // Stop all snapshot lifecycle management (SLM) operations and the SLM plugin. @@ -346,7 +346,7 @@ func (r *Stop) FilterPath(filterpaths ...string) *Stop { // 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 +// `"exists_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. diff --git a/typedapi/snapshot/cleanuprepository/cleanup_repository.go b/typedapi/snapshot/cleanuprepository/cleanup_repository.go index a2fe54735e..6fc4a25e9f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clean up the snapshot repository. // Trigger the review of the contents of a snapshot repository and delete any @@ -351,7 +351,7 @@ func (r *CleanupRepository) FilterPath(filterpaths ...string) *CleanupRepository // 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 +// `"exists_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. diff --git a/typedapi/snapshot/cleanuprepository/response.go b/typedapi/snapshot/cleanuprepository/response.go index 0407974b1c..e95f9375e2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package cleanuprepository @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package cleanuprepository // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e8d63d822d..4561de086a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clone a snapshot. // Clone part of all of a snapshot into another snapshot in the same repository. @@ -391,7 +391,7 @@ func (r *Clone) FilterPath(filterpaths ...string) *Clone { // 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 +// `"exists_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. diff --git a/typedapi/snapshot/clone/request.go b/typedapi/snapshot/clone/request.go index f7a087175f..d2e70fc4c7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clone @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/clone/SnapshotCloneRequest.ts#L24-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/clone/SnapshotCloneRequest.ts#L24-L70 type Request struct { // Indices A comma-separated list of indices to include in the snapshot. diff --git a/typedapi/snapshot/clone/response.go b/typedapi/snapshot/clone/response.go index f73506d55b..4908f85e70 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clone // Response holds the response body struct for the package clone // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/clone/SnapshotCloneResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/clone/SnapshotCloneResponse.ts#L22-L25 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 990f472dd4..938ec3fc90 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a snapshot. // Take a snapshot of a cluster or of data streams and indices. @@ -379,7 +379,7 @@ func (r *Create) FilterPath(filterpaths ...string) *Create { // 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 +// `"exists_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. diff --git a/typedapi/snapshot/create/request.go b/typedapi/snapshot/create/request.go index 41997bfe08..6fa7934d04 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package create @@ -34,7 +34,7 @@ import ( // Request holds the request body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/create/SnapshotCreateRequest.ts#L24-L126 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/create/SnapshotCreateRequest.ts#L24-L126 type Request struct { // ExpandWildcards Determines how wildcard patterns in the `indices` parameter match data diff --git a/typedapi/snapshot/create/response.go b/typedapi/snapshot/create/response.go index d64ece2b98..ec6ed1c2f6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package create @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package create // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/create/SnapshotCreateResponse.ts#L22-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dd6b80ae6e..ed6eac3c0e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a snapshot repository. // IMPORTANT: If you are migrating searchable snapshots, the repository name @@ -393,7 +393,7 @@ func (r *CreateRepository) FilterPath(filterpaths ...string) *CreateRepository { // 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 +// `"exists_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. diff --git a/typedapi/snapshot/createrepository/request.go b/typedapi/snapshot/createrepository/request.go index 5f39cffe1a..ca66fdd042 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package createrepository @@ -26,5 +26,5 @@ import ( // Request holds the request body struct for the package createrepository // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/create_repository/SnapshotCreateRepositoryRequest.ts#L25-L79 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/create_repository/SnapshotCreateRepositoryRequest.ts#L25-L79 type Request = types.Repository diff --git a/typedapi/snapshot/createrepository/response.go b/typedapi/snapshot/createrepository/response.go index b780d6561a..4f8af286bb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package createrepository // Response holds the response body struct for the package createrepository // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/create_repository/SnapshotCreateRepositoryResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/create_repository/SnapshotCreateRepositoryResponse.ts#L22-L25 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 c37e9db249..0c6b5ad5bb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete snapshots. package delete @@ -329,6 +329,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 @@ -353,7 +364,7 @@ func (r *Delete) FilterPath(filterpaths ...string) *Delete { // 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 +// `"exists_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. diff --git a/typedapi/snapshot/delete/response.go b/typedapi/snapshot/delete/response.go index ffa52e4f20..85c8b5f41e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package delete // Response holds the response body struct for the package delete // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/delete/SnapshotDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/delete/SnapshotDeleteResponse.ts#L22-L25 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 8fdfcdbd47..e9106441bd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete snapshot repositories. // When a repository is unregistered, Elasticsearch removes only the reference @@ -352,7 +352,7 @@ func (r *DeleteRepository) FilterPath(filterpaths ...string) *DeleteRepository { // 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 +// `"exists_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. diff --git a/typedapi/snapshot/deleterepository/response.go b/typedapi/snapshot/deleterepository/response.go index 9adb0130de..52aa165e0b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleterepository // Response holds the response body struct for the package deleterepository // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/delete_repository/SnapshotDeleteRepositoryResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/delete_repository/SnapshotDeleteRepositoryResponse.ts#L22-L25 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 19f38ff3a7..688be15de8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get snapshot information. // @@ -42,6 +42,7 @@ import ( "github.com/elastic/elastic-transport-go/v8/elastictransport" "github.com/elastic/go-elasticsearch/v9/typedapi/types" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/snapshotsort" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/snapshotstate" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/sortorder" ) @@ -467,6 +468,20 @@ func (r *Get) Sort(sort snapshotsort.SnapshotSort) *Get { return r } +// State Only return snapshots with a state found in the given comma-separated list of +// snapshot states. +// The default is all snapshot states. +// API name: state +func (r *Get) State(states ...snapshotstate.SnapshotState) *Get { + tmp := []string{} + for _, item := range states { + tmp = append(tmp, fmt.Sprintf("%v", item)) + } + r.values.Set("state", strings.Join(tmp, ",")) + + return r +} + // Verbose If `true`, returns additional information about each snapshot such as the // version of Elasticsearch which took the snapshot, the start and end times of // the snapshot, and the number of shards snapshotted. @@ -506,7 +521,7 @@ func (r *Get) FilterPath(filterpaths ...string) *Get { // 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 +// `"exists_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. diff --git a/typedapi/snapshot/get/response.go b/typedapi/snapshot/get/response.go index 66fb55b107..0d9475142e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package get @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/get/SnapshotGetResponse.ts#L25-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/get/SnapshotGetResponse.ts#L25-L47 type Response struct { // Next If the request contained a size limit and there might be more results, a diff --git a/typedapi/snapshot/getrepository/get_repository.go b/typedapi/snapshot/getrepository/get_repository.go index 8e74a50d79..acada47598 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get snapshot repository information. package getrepository @@ -350,7 +350,7 @@ func (r *GetRepository) FilterPath(filterpaths ...string) *GetRepository { // 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 +// `"exists_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. diff --git a/typedapi/snapshot/getrepository/response.go b/typedapi/snapshot/getrepository/response.go index 890f0f6669..f21d432733 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getrepository @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package getrepository // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/get_repository/SnapshotGetRepositoryResponse.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/get_repository/SnapshotGetRepositoryResponse.ts#L23-L26 type Response map[string]types.Repository diff --git a/typedapi/snapshot/repositoryanalyze/repository_analyze.go b/typedapi/snapshot/repositoryanalyze/repository_analyze.go index c7abffc81f..969f0c4788 100644 --- a/typedapi/snapshot/repositoryanalyze/repository_analyze.go +++ b/typedapi/snapshot/repositoryanalyze/repository_analyze.go @@ -16,36 +16,38 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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. +// Performs operations on a snapshot repository in order to check for incorrect +// behaviour. // // 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. +// 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`. +// Some repositories may behave correctly when lightly loaded but incorrectly +// under production-like workloads. +// If the first analysis is 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. +// Some repositories may behave correctly when accessed by a small number of +// Elasticsearch nodes but incorrectly when accessed concurrently by a +// production-scale cluster. // 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. @@ -55,6 +57,26 @@ // 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. +// Repository analysis triggers conditions that occur only rarely when taking +// snapshots in a production system. +// Snapshotting to unsuitable storage may appear to work correctly most of the +// time despite repository analysis failures. +// However your snapshot data is at risk if you store it in a snapshot +// repository that does not reliably pass repository analysis. +// You can demonstrate that the analysis failure is due to an incompatible +// storage implementation by verifying that Elasticsearch does not detect the +// same problem when analysing the reference implementation of the storage +// protocol you are using. +// For instance, if you are using storage that offers an API which the supplier +// claims to be compatible with AWS S3, verify that repositories in AWS S3 do +// not fail repository analysis. +// This allows you to demonstrate to your storage supplier that a repository +// analysis failure must only be caused by an incompatibility with AWS S3 and +// cannot be attributed to a problem in Elasticsearch. +// Please do not report Elasticsearch issues involving third-party storage +// systems unless you can demonstrate that the same issue exists when analysing +// a repository that uses the reference implementation of the same storage +// protocol. // You will need to work with the supplier of your storage system to address the // incompatibilities that Elasticsearch detects. // @@ -111,8 +133,11 @@ // `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: This API is intended for exploratory use by humans. +// You should expect the request parameters and the response format to vary in +// future versions. +// The response exposes immplementation details of the analysis which may change +// from version to version. // // NOTE: Different versions of Elasticsearch may perform different checks for // repository compatibility, with newer versions typically being stricter than @@ -131,9 +156,9 @@ // // 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. +// 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 @@ -251,33 +276,35 @@ func NewRepositoryAnalyzeFunc(tp elastictransport.Interface) NewRepositoryAnalyz } // 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. +// Performs operations on a snapshot repository in order to check for incorrect +// behaviour. // // 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. +// 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`. +// Some repositories may behave correctly when lightly loaded but incorrectly +// under production-like workloads. +// If the first analysis is 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. +// Some repositories may behave correctly when accessed by a small number of +// Elasticsearch nodes but incorrectly when accessed concurrently by a +// production-scale cluster. // 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. @@ -287,6 +314,26 @@ func NewRepositoryAnalyzeFunc(tp elastictransport.Interface) NewRepositoryAnalyz // 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. +// Repository analysis triggers conditions that occur only rarely when taking +// snapshots in a production system. +// Snapshotting to unsuitable storage may appear to work correctly most of the +// time despite repository analysis failures. +// However your snapshot data is at risk if you store it in a snapshot +// repository that does not reliably pass repository analysis. +// You can demonstrate that the analysis failure is due to an incompatible +// storage implementation by verifying that Elasticsearch does not detect the +// same problem when analysing the reference implementation of the storage +// protocol you are using. +// For instance, if you are using storage that offers an API which the supplier +// claims to be compatible with AWS S3, verify that repositories in AWS S3 do +// not fail repository analysis. +// This allows you to demonstrate to your storage supplier that a repository +// analysis failure must only be caused by an incompatibility with AWS S3 and +// cannot be attributed to a problem in Elasticsearch. +// Please do not report Elasticsearch issues involving third-party storage +// systems unless you can demonstrate that the same issue exists when analysing +// a repository that uses the reference implementation of the same storage +// protocol. // You will need to work with the supplier of your storage system to address the // incompatibilities that Elasticsearch detects. // @@ -343,8 +390,11 @@ func NewRepositoryAnalyzeFunc(tp elastictransport.Interface) NewRepositoryAnalyz // `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: This API is intended for exploratory use by humans. +// You should expect the request parameters and the response format to vary in +// future versions. +// The response exposes immplementation details of the analysis which may change +// from version to version. // // NOTE: Different versions of Elasticsearch may perform different checks for // repository compatibility, with newer versions typically being stricter than @@ -363,9 +413,9 @@ func NewRepositoryAnalyzeFunc(tp elastictransport.Interface) NewRepositoryAnalyz // // 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. +// 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 @@ -783,7 +833,7 @@ func (r *RepositoryAnalyze) FilterPath(filterpaths ...string) *RepositoryAnalyze // 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 +// `"exists_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. diff --git a/typedapi/snapshot/repositoryanalyze/response.go b/typedapi/snapshot/repositoryanalyze/response.go index 33694b6c2f..18110e0999 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package repositoryanalyze @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package repositoryanalyze // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L24-L108 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 34ee45e8d2..252d776593 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Verify the repository integrity. // Verify the integrity of the contents of a snapshot repository. @@ -529,7 +529,7 @@ func (r *RepositoryVerifyIntegrity) FilterPath(filterpaths ...string) *Repositor // 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 +// `"exists_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. diff --git a/typedapi/snapshot/repositoryverifyintegrity/response.go b/typedapi/snapshot/repositoryverifyintegrity/response.go index c1ec71c59d..48c6c2ac22 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package repositoryverifyintegrity @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package repositoryverifyintegrity // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/repository_verify_integrity/SnapshotRepositoryVerifyIntegrityResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/repository_verify_integrity/SnapshotRepositoryVerifyIntegrityResponse.ts#L22-L25 type Response = json.RawMessage diff --git a/typedapi/snapshot/restore/request.go b/typedapi/snapshot/restore/request.go index bb80188981..ad20a7d4ef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package restore @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package restore // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/restore/SnapshotRestoreRequest.ts#L25-L175 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/restore/SnapshotRestoreRequest.ts#L25-L175 type Request struct { // FeatureStates The feature states to restore. diff --git a/typedapi/snapshot/restore/response.go b/typedapi/snapshot/restore/response.go index b751e0b9cb..480787e0cb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package restore @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package restore // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/restore/SnapshotRestoreResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 35796b42d5..6d826df11c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Restore a snapshot. // Restore a snapshot of a cluster or data streams and indices. @@ -435,7 +435,7 @@ func (r *Restore) FilterPath(filterpaths ...string) *Restore { // 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 +// `"exists_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. diff --git a/typedapi/snapshot/status/response.go b/typedapi/snapshot/status/response.go index 897c760b04..4776f535de 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package status @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package status // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/status/SnapshotStatusResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f9af49a9a1..75b14f38fc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the snapshot status. // Get a detailed description of the current state for each shard participating @@ -434,7 +434,7 @@ func (r *Status) FilterPath(filterpaths ...string) *Status { // 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 +// `"exists_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. diff --git a/typedapi/snapshot/verifyrepository/response.go b/typedapi/snapshot/verifyrepository/response.go index 1811d12bf4..cd19d3bbb4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package verifyrepository @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package verifyrepository // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L23-L31 type Response struct { // Nodes Information about the nodes connected to the snapshot repository. diff --git a/typedapi/snapshot/verifyrepository/verify_repository.go b/typedapi/snapshot/verifyrepository/verify_repository.go index e781e5381d..d5f8414a18 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Verify a snapshot repository. // Check for common misconfigurations in a snapshot repository. @@ -349,7 +349,7 @@ func (r *VerifyRepository) FilterPath(filterpaths ...string) *VerifyRepository { // 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 +// `"exists_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. diff --git a/typedapi/sql/clearcursor/clear_cursor.go b/typedapi/sql/clearcursor/clear_cursor.go index 316abbcc8c..e2bf81d651 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Clear an SQL search cursor. package clearcursor @@ -314,7 +314,7 @@ func (r *ClearCursor) FilterPath(filterpaths ...string) *ClearCursor { // 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 +// `"exists_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. diff --git a/typedapi/sql/clearcursor/request.go b/typedapi/sql/clearcursor/request.go index 901956b72e..cef5ed4649 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clearcursor @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package clearcursor // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/sql/clear_cursor/ClearSqlCursorRequest.ts#L22-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 015e14a64f..048fb673e9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package clearcursor // Response holds the response body struct for the package clearcursor // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/sql/clear_cursor/ClearSqlCursorResponse.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d5070d90b1..dee2880b8b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete an async SQL search. // Delete an async SQL search or a stored synchronous SQL search. @@ -341,7 +341,7 @@ func (r *DeleteAsync) FilterPath(filterpaths ...string) *DeleteAsync { // 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 +// `"exists_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. diff --git a/typedapi/sql/deleteasync/response.go b/typedapi/sql/deleteasync/response.go index 81192191e2..3ffdb4eef5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deleteasync // Response holds the response body struct for the package deleteasync // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/sql/delete_async/SqlDeleteAsyncResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/delete_async/SqlDeleteAsyncResponse.ts#L22-L25 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 fa87a38da1..fdb9c0a883 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get async SQL search results. // Get the current status and available results for an async SQL search or @@ -371,7 +371,7 @@ func (r *GetAsync) FilterPath(filterpaths ...string) *GetAsync { // 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 +// `"exists_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. diff --git a/typedapi/sql/getasync/response.go b/typedapi/sql/getasync/response.go index a7649f6003..2f1b7d4f30 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getasync @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package getasync // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/sql/get_async/SqlGetAsyncResponse.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8f41057f7b..c6a755ecf4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get the async SQL search status. // Get the current status of an async SQL search or a stored synchronous SQL @@ -329,7 +329,7 @@ func (r *GetAsyncStatus) FilterPath(filterpaths ...string) *GetAsyncStatus { // 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 +// `"exists_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. diff --git a/typedapi/sql/getasyncstatus/response.go b/typedapi/sql/getasyncstatus/response.go index f1e297e56d..5f4250686b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getasyncstatus // Response holds the response body struct for the package getasyncstatus // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/sql/get_async_status/SqlGetAsyncStatusResponse.ts#L23-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7e36b38681..3f98920778 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get SQL search results. // Run an SQL request. @@ -326,7 +326,7 @@ func (r *Query) FilterPath(filterpaths ...string) *Query { // 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 +// `"exists_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. @@ -510,31 +510,16 @@ func (r *Query) PageTimeout(duration types.DurationVariant) *Query { // The values for parameters in the query. // API name: params -func (r *Query) Params(params map[string]json.RawMessage) *Query { +func (r *Query) Params(params ...json.RawMessage) *Query { // Initialize the request if it is not already initialized if r.req == nil { r.req = NewRequest() } - r.req.Params = params - return r -} + for _, v := range params { -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() - } + r.req.Params = append(r.req.Params, v) - 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 } diff --git a/typedapi/sql/query/request.go b/typedapi/sql/query/request.go index f2a0fb664e..ad7347e580 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package query @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/sql/query/QuerySqlRequest.ts#L28-L152 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e8bef18cef..66c6f2f0d1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package query @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package query // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/sql/query/QuerySqlResponse.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 18257a400e..c0562ee2fb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package translate @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package translate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/sql/translate/TranslateSqlRequest.ts#L25-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 907029f7ae..f388d5c3c5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package translate @@ -33,7 +33,7 @@ import ( // Response holds the response body struct for the package translate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/sql/translate/TranslateSqlResponse.ts#L27-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cae75a7c5d..329f3a6990 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Translate SQL into Elasticsearch queries. // Translate an SQL search into a search API request containing Query DSL. @@ -320,7 +320,7 @@ func (r *Translate) FilterPath(filterpaths ...string) *Translate { // 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 +// `"exists_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. diff --git a/typedapi/ssl/certificates/certificates.go b/typedapi/ssl/certificates/certificates.go index b6025fde90..40ac83aea0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get SSL certificates. // @@ -358,7 +358,7 @@ func (r *Certificates) FilterPath(filterpaths ...string) *Certificates { // 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 +// `"exists_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. diff --git a/typedapi/ssl/certificates/response.go b/typedapi/ssl/certificates/response.go index 756ae65652..3bfdf33c03 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package certificates @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package certificates // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ssl/certificates/GetCertificatesResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ssl/certificates/GetCertificatesResponse.ts#L22-L25 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..6666281684 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// 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=9") + } + + 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..df3c81c7b4 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// 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=9") + } + + 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..61ed64c740 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// 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=9") + } + + 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 dc2faef33e..26733a8262 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a synonym set. // @@ -371,7 +371,7 @@ func (r *DeleteSynonym) FilterPath(filterpaths ...string) *DeleteSynonym { // 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 +// `"exists_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. diff --git a/typedapi/synonyms/deletesynonym/response.go b/typedapi/synonyms/deletesynonym/response.go index 4904f4f993..1463e0a700 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletesynonym // Response holds the response body struct for the package deletesynonym // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/synonyms/delete_synonym/SynonymsDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/delete_synonym/SynonymsDeleteResponse.ts#L22-L25 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 c4b5c46fe0..9ef6e0491a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a synonym rule. // Delete a synonym rule from a synonym set. @@ -325,6 +325,16 @@ func (r *DeleteSynonymRule) _ruleid(ruleid string) *DeleteSynonymRule { return r } +// Refresh If `true`, the request will refresh the analyzers with the deleted synonym +// rule and wait for the new synonyms to be available before returning. +// If `false`, analyzers will not be reloaded with the deleted synonym rule +// API name: refresh +func (r *DeleteSynonymRule) Refresh(refresh bool) *DeleteSynonymRule { + r.values.Set("refresh", strconv.FormatBool(refresh)) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -349,7 +359,7 @@ func (r *DeleteSynonymRule) FilterPath(filterpaths ...string) *DeleteSynonymRule // 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 +// `"exists_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. diff --git a/typedapi/synonyms/deletesynonymrule/response.go b/typedapi/synonyms/deletesynonymrule/response.go index 9dc6efc76b..f335ccc86f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletesynonymrule @@ -27,12 +27,13 @@ import ( // Response holds the response body struct for the package deletesynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/synonyms/delete_synonym_rule/SynonymRuleDeleteResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/delete_synonym_rule/SynonymRuleDeleteResponse.ts#L22-L25 type Response struct { - // ReloadAnalyzersDetails Updating synonyms in a synonym set reloads the associated analyzers. + // ReloadAnalyzersDetails Updating synonyms in a synonym set can reload the associated analyzers in + // case refresh is set to true. // This information is the analyzers reloading result. - ReloadAnalyzersDetails types.ReloadResult `json:"reload_analyzers_details"` + ReloadAnalyzersDetails *types.ReloadResult `json:"reload_analyzers_details,omitempty"` // Result The update operation result. Result result.Result `json:"result"` } diff --git a/typedapi/synonyms/getsynonym/get_synonym.go b/typedapi/synonyms/getsynonym/get_synonym.go index b2efac6809..563056820d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get a synonym set. package getsynonym @@ -337,7 +337,7 @@ func (r *GetSynonym) FilterPath(filterpaths ...string) *GetSynonym { // 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 +// `"exists_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. diff --git a/typedapi/synonyms/getsynonym/response.go b/typedapi/synonyms/getsynonym/response.go index 8b05b65f15..39f92bb6ec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getsynonym @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsynonym // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/synonyms/get_synonym/SynonymsGetResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 84fc2552e0..ac5d09271a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get a synonym rule. // Get a synonym rule from a synonym set. @@ -349,7 +349,7 @@ func (r *GetSynonymRule) FilterPath(filterpaths ...string) *GetSynonymRule { // 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 +// `"exists_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. diff --git a/typedapi/synonyms/getsynonymrule/response.go b/typedapi/synonyms/getsynonymrule/response.go index a0849de9eb..28e3886a2b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getsynonymrule // Response holds the response body struct for the package getsynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/synonyms/get_synonym_rule/SynonymRuleGetResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/get_synonym_rule/SynonymRuleGetResponse.ts#L22-L25 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 855d79e8f9..abbc4b81e0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get all synonym sets. // Get a summary of all defined synonym sets. @@ -316,7 +316,7 @@ func (r *GetSynonymsSets) FilterPath(filterpaths ...string) *GetSynonymsSets { // 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 +// `"exists_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. diff --git a/typedapi/synonyms/getsynonymssets/response.go b/typedapi/synonyms/getsynonymssets/response.go index 2f8c2d79bb..6b820c4df1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getsynonymssets @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsynonymssets // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 13368df5ea..7844564667 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a synonym set. // Synonyms sets are limited to a maximum of 10,000 synonym rules per set. @@ -27,6 +27,9 @@ // 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. +// +// For practical examples of how to create or update a synonyms set, refer to +// the External documentation. package putsynonym import ( @@ -99,6 +102,9 @@ func NewPutSynonymFunc(tp elastictransport.Interface) NewPutSynonym { // This is equivalent to invoking the reload search analyzers API for all // indices that use the synonyms set. // +// For practical examples of how to create or update a synonyms set, refer to +// the External documentation. +// // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-synonyms-put-synonym func New(tp elastictransport.Interface) *PutSynonym { r := &PutSynonym{ @@ -327,6 +333,16 @@ func (r *PutSynonym) _id(id string) *PutSynonym { return r } +// Refresh If `true`, the request will refresh the analyzers with the new synonyms set +// and wait for the new synonyms to be available before returning. +// If `false`, analyzers will not be reloaded with the new synonym set +// API name: refresh +func (r *PutSynonym) Refresh(refresh bool) *PutSynonym { + r.values.Set("refresh", strconv.FormatBool(refresh)) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -351,7 +367,7 @@ func (r *PutSynonym) FilterPath(filterpaths ...string) *PutSynonym { // 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 +// `"exists_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. diff --git a/typedapi/synonyms/putsynonym/request.go b/typedapi/synonyms/putsynonym/request.go index 8aedf9499c..7b67f6f2f1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putsynonym @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package putsynonym // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/synonyms/put_synonym/SynonymsPutRequest.ts#L23-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/put_synonym/SynonymsPutRequest.ts#L23-L67 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 5a33cbd792..fbf1179e7e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putsynonym @@ -27,10 +27,15 @@ import ( // Response holds the response body struct for the package putsynonym // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/synonyms/put_synonym/SynonymsPutResponse.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/put_synonym/SynonymsPutResponse.ts#L23-L36 type Response struct { - ReloadAnalyzersDetails types.ReloadResult `json:"reload_analyzers_details"` - Result result.Result `json:"result"` + + // ReloadAnalyzersDetails Updating a synonyms set can reload the associated analyzers in case refresh + // is set to true. + // This information is the analyzers reloading result. + ReloadAnalyzersDetails *types.ReloadResult `json:"reload_analyzers_details,omitempty"` + // Result The update operation result. + Result result.Result `json:"result"` } // NewResponse returns a Response diff --git a/typedapi/synonyms/putsynonymrule/put_synonym_rule.go b/typedapi/synonyms/putsynonymrule/put_synonym_rule.go index 6403c3ecfa..5f1e42c627 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a synonym rule. // Create or update a synonym rule in a synonym set. @@ -343,6 +343,16 @@ func (r *PutSynonymRule) _ruleid(ruleid string) *PutSynonymRule { return r } +// Refresh If `true`, the request will refresh the analyzers with the new synonym rule +// and wait for the new synonyms to be available before returning. +// If `false`, analyzers will not be reloaded with the new synonym rule +// API name: refresh +func (r *PutSynonymRule) Refresh(refresh bool) *PutSynonymRule { + r.values.Set("refresh", strconv.FormatBool(refresh)) + + return r +} + // ErrorTrace When set to `true` Elasticsearch will include the full stack trace of errors // when they occur. // API name: error_trace @@ -367,7 +377,7 @@ func (r *PutSynonymRule) FilterPath(filterpaths ...string) *PutSynonymRule { // 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 +// `"exists_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. diff --git a/typedapi/synonyms/putsynonymrule/request.go b/typedapi/synonyms/putsynonymrule/request.go index c8ca5a3f55..05f256bca0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putsynonymrule @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package putsynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/put_synonym_rule/SynonymRulePutRequest.ts#L23-L69 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 da3d0a4b4b..2d6707549b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putsynonymrule @@ -27,12 +27,13 @@ import ( // Response holds the response body struct for the package putsynonymrule // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/synonyms/put_synonym_rule/SynonymRulePutResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/put_synonym_rule/SynonymRulePutResponse.ts#L22-L25 type Response struct { - // ReloadAnalyzersDetails Updating synonyms in a synonym set reloads the associated analyzers. + // ReloadAnalyzersDetails Updating synonyms in a synonym set can reload the associated analyzers in + // case refresh is set to true. // This information is the analyzers reloading result. - ReloadAnalyzersDetails types.ReloadResult `json:"reload_analyzers_details"` + ReloadAnalyzersDetails *types.ReloadResult `json:"reload_analyzers_details,omitempty"` // Result The update operation result. Result result.Result `json:"result"` } diff --git a/typedapi/tasks/cancel/cancel.go b/typedapi/tasks/cancel/cancel.go index 6fdca32678..5fe0b20b53 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Cancel a task. // @@ -408,7 +408,7 @@ func (r *Cancel) FilterPath(filterpaths ...string) *Cancel { // 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 +// `"exists_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. diff --git a/typedapi/tasks/cancel/response.go b/typedapi/tasks/cancel/response.go index 1cfeb676b6..5077caac20 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package cancel @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package cancel // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/tasks/cancel/CancelTasksResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/cancel/CancelTasksResponse.ts#L22-L25 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 4c732a5049..d8d1483767 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get task information. // Get information about a task currently running in the cluster. @@ -355,7 +355,7 @@ func (r *Get) FilterPath(filterpaths ...string) *Get { // 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 +// `"exists_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. diff --git a/typedapi/tasks/get/response.go b/typedapi/tasks/get/response.go index d9e4defb3f..ddfa9aa544 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package get @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package get // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/tasks/get/GetTaskResponse.ts#L24-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 05b5b50805..a5c2d8f32b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get all tasks. // Get information about the tasks currently running on one or more nodes in the @@ -507,7 +507,7 @@ func (r *List) FilterPath(filterpaths ...string) *List { // 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 +// `"exists_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. diff --git a/typedapi/tasks/list/response.go b/typedapi/tasks/list/response.go index bd76a80d87..75e8bb99ba 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package list @@ -32,7 +32,7 @@ import ( // Response holds the response body struct for the package list // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/tasks/list/ListTasksResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/list/ListTasksResponse.ts#L22-L25 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 1e0383c4b7..8822373c26 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Find the structure of a text field. // Find the structure of a text field in an Elasticsearch index. @@ -575,7 +575,7 @@ func (r *FindFieldStructure) FilterPath(filterpaths ...string) *FindFieldStructu // 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 +// `"exists_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. diff --git a/typedapi/textstructure/findfieldstructure/response.go b/typedapi/textstructure/findfieldstructure/response.go index 0f7ce116c7..c4ef74ba8e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package findfieldstructure @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package findfieldstructure // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/find_field_structure/FindFieldStructureResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 63c6079423..c8ecc873a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Find the structure of text messages. // Find the structure of a list of text messages. @@ -568,7 +568,7 @@ func (r *FindMessageStructure) FilterPath(filterpaths ...string) *FindMessageStr // 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 +// `"exists_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. diff --git a/typedapi/textstructure/findmessagestructure/request.go b/typedapi/textstructure/findmessagestructure/request.go index 20c614cc09..b8ffb9e054 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package findmessagestructure @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package findmessagestructure // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/find_message_structure/FindMessageStructureRequest.ts#L25-L174 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7a65d3b687..7e9f9a844d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package findmessagestructure @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package findmessagestructure // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/find_message_structure/FindMessageStructureResponse.ts#L31-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e047081e9f..05a43e5236 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 dd261c6a50..bd66c394bb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package findstructure @@ -26,7 +26,7 @@ import ( // Request holds the request body struct for the package findstructure // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/find_structure/FindStructureRequest.ts#L24-L207 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/text_structure/find_structure/FindStructureRequest.ts#L24-L208 type Request = []json.RawMessage // NewRequest returns a Request diff --git a/typedapi/textstructure/findstructure/response.go b/typedapi/textstructure/findstructure/response.go index 470d338cf7..4958fc3f40 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package findstructure @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package findstructure // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/find_structure/FindStructureResponse.ts#L27-L97 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 521b3abb6d..7a3cf66187 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package testgrokpattern @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package testgrokpattern // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/test_grok_pattern/TestGrokPatternRequest.ts#L23-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 956d32a8e5..7faeadbb45 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package testgrokpattern @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package testgrokpattern // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/test_grok_pattern/TestGrokPatternResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 94e6a6a5ee..811abcd366 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Test a Grok pattern. // Test a Grok pattern on one or more lines of text. @@ -331,7 +331,7 @@ func (r *TestGrokPattern) FilterPath(filterpaths ...string) *TestGrokPattern { // 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 +// `"exists_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. diff --git a/typedapi/transform/deletetransform/delete_transform.go b/typedapi/transform/deletetransform/delete_transform.go index 7472cf79b2..ee88184dbf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a transform. package deletetransform @@ -350,7 +350,7 @@ func (r *DeleteTransform) FilterPath(filterpaths ...string) *DeleteTransform { // 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 +// `"exists_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. diff --git a/typedapi/transform/deletetransform/response.go b/typedapi/transform/deletetransform/response.go index 0707ac058e..9c47b55be7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletetransform // Response holds the response body struct for the package deletetransform // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/delete_transform/DeleteTransformResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/delete_transform/DeleteTransformResponse.ts#L22-L25 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 75f865b102..a17c3fe8e9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // 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 547dc2609f..cee117a648 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get transforms. // Get configuration information for transforms. @@ -370,7 +370,7 @@ func (r *GetTransform) FilterPath(filterpaths ...string) *GetTransform { // 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 +// `"exists_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. diff --git a/typedapi/transform/gettransform/response.go b/typedapi/transform/gettransform/response.go index ee6cf25ee8..422c9a9be2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package gettransform @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettransform // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/get_transform/GetTransformResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8c8d4db2e0..05591aca4f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get transform stats. // @@ -369,7 +369,7 @@ func (r *GetTransformStats) FilterPath(filterpaths ...string) *GetTransformStats // 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 +// `"exists_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. diff --git a/typedapi/transform/gettransformstats/response.go b/typedapi/transform/gettransformstats/response.go index 4ecdc8a64a..d90626ee5e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package gettransformstats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package gettransformstats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/get_transform_stats/GetTransformStatsResponse.ts#L23-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a621acd471..2988120bee 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Preview a transform. // Generates a preview of the results that you will get when you create a @@ -369,7 +369,7 @@ func (r *PreviewTransform) FilterPath(filterpaths ...string) *PreviewTransform { // 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 +// `"exists_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. diff --git a/typedapi/transform/previewtransform/request.go b/typedapi/transform/previewtransform/request.go index aad982623c..e599c32dfa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package previewtransform @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package previewtransform // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/preview_transform/PreviewTransformRequest.ts#L33-L119 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d42706d7c3..5d1a3b970e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package previewtransform @@ -28,7 +28,7 @@ import ( // Response holds the response body struct for the package previewtransform // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/preview_transform/PreviewTransformResponse.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f4debc3750..9bc3ce7b3b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create a transform. // Creates a transform. @@ -431,7 +431,7 @@ func (r *PutTransform) FilterPath(filterpaths ...string) *PutTransform { // 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 +// `"exists_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. diff --git a/typedapi/transform/puttransform/request.go b/typedapi/transform/puttransform/request.go index 3b54ac2c1d..f21878d60a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puttransform @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package puttransform // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/put_transform/PutTransformRequest.ts#L33-L130 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a6b66a350a..d41a468d22 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package puttransform // Response holds the response body struct for the package puttransform // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/put_transform/PutTransformResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/put_transform/PutTransformResponse.ts#L22-L25 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 c0dda11579..530276320a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Reset a transform. // @@ -353,7 +353,7 @@ func (r *ResetTransform) FilterPath(filterpaths ...string) *ResetTransform { // 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 +// `"exists_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. diff --git a/typedapi/transform/resettransform/response.go b/typedapi/transform/resettransform/response.go index 0b4cef1bbf..54ff1c0bd0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package resettransform // Response holds the response body struct for the package resettransform // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/reset_transform/ResetTransformResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/reset_transform/ResetTransformResponse.ts#L22-L25 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 db1a454564..efb5be55de 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package schedulenowtransform // Response holds the response body struct for the package schedulenowtransform // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/schedule_now_transform/ScheduleNowTransformResponse.ts#L21-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/schedule_now_transform/ScheduleNowTransformResponse.ts#L21-L24 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 a6e1c34363..8cac877ce0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Schedule a transform to start now. // @@ -351,7 +351,7 @@ func (r *ScheduleNowTransform) FilterPath(filterpaths ...string) *ScheduleNowTra // 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 +// `"exists_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. diff --git a/typedapi/transform/starttransform/response.go b/typedapi/transform/starttransform/response.go index 5ddf5ef49a..363546f083 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package starttransform // Response holds the response body struct for the package starttransform // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/start_transform/StartTransformResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/start_transform/StartTransformResponse.ts#L22-L25 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 72130535e2..8a7e7951f1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Start a transform. // @@ -396,7 +396,7 @@ func (r *StartTransform) FilterPath(filterpaths ...string) *StartTransform { // 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 +// `"exists_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. diff --git a/typedapi/transform/stoptransform/response.go b/typedapi/transform/stoptransform/response.go index 6b4118fe72..52671b677f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stoptransform // Response holds the response body struct for the package stoptransform // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/stop_transform/StopTransformResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/stop_transform/StopTransformResponse.ts#L22-L25 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 35d0e34f1a..1e1c3639f7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Stop transforms. // Stops one or more transforms. @@ -386,7 +386,7 @@ func (r *StopTransform) FilterPath(filterpaths ...string) *StopTransform { // 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 +// `"exists_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. diff --git a/typedapi/transform/updatetransform/request.go b/typedapi/transform/updatetransform/request.go index 5beda1e647..bc89e17718 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatetransform @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package updatetransform // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/update_transform/UpdateTransformRequest.ts#L31-L113 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 64f88d6d32..f71dac22a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatetransform @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package updatetransform // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/update_transform/UpdateTransformResponse.ts#L33-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0f5ffc0822..d908ea1bda 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update a transform. // Updates certain properties of a transform. @@ -378,7 +378,7 @@ func (r *UpdateTransform) FilterPath(filterpaths ...string) *UpdateTransform { // 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 +// `"exists_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. diff --git a/typedapi/transform/upgradetransforms/response.go b/typedapi/transform/upgradetransforms/response.go index d24d6fef28..9eec1e2193 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package upgradetransforms // Response holds the response body struct for the package upgradetransforms // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/upgrade_transforms/UpgradeTransformsResponse.ts#L25-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 04b91a65ca..be5a92144f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Upgrade all transforms. // @@ -370,7 +370,7 @@ func (r *UpgradeTransforms) FilterPath(filterpaths ...string) *UpgradeTransforms // 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 +// `"exists_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. diff --git a/typedapi/types/access.go b/typedapi/types/access.go index b45b3930bc..a267f04121 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Access type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Access.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -37,8 +37,6 @@ func NewAccess() *Access { return r } -// true - type AccessVariant interface { AccessCaster() *Access } diff --git a/typedapi/types/acknowledgement.go b/typedapi/types/acknowledgement.go index 78f51a81b6..fb085f7736 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Acknowledgement type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/post/types.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 82781fec67..67aca0f8fe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // AcknowledgeState type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Action.ts#L109-L112 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L109-L112 type AcknowledgeState struct { State acknowledgementoptions.AcknowledgementOptions `json:"state"` Timestamp DateTime `json:"timestamp"` @@ -75,8 +75,6 @@ func NewAcknowledgeState() *AcknowledgeState { return r } -// true - type AcknowledgeStateVariant interface { AcknowledgeStateCaster() *AcknowledgeState } diff --git a/typedapi/types/actionstatus.go b/typedapi/types/actionstatus.go index 47d8c01877..9dfd018eb9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ActionStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Action.ts#L125-L130 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L125-L130 type ActionStatus struct { Ack AcknowledgeState `json:"ack"` LastExecution *ExecutionState `json:"last_execution,omitempty"` @@ -37,8 +37,6 @@ func NewActionStatus() *ActionStatus { return r } -// true - type ActionStatusVariant interface { ActionStatusCaster() *ActionStatus } diff --git a/typedapi/types/activationstate.go b/typedapi/types/activationstate.go index 752dc82bb7..2ec1e7d43c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ActivationState type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Activation.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Activation.ts#L24-L27 type ActivationState struct { Active bool `json:"active"` Timestamp DateTime `json:"timestamp"` @@ -83,8 +83,6 @@ func NewActivationState() *ActivationState { return r } -// true - type ActivationStateVariant interface { ActivationStateCaster() *ActivationState } diff --git a/typedapi/types/activationstatus.go b/typedapi/types/activationstatus.go index 2815ce91f5..f66932e818 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ActivationStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Activation.ts#L29-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3f7a866ed4..c9e0575429 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AdaptiveAllocations type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L60-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L99-L116 type AdaptiveAllocations struct { // Enabled Turn on `adaptive_allocations`. Enabled *bool `json:"enabled,omitempty"` @@ -117,8 +117,6 @@ func NewAdaptiveAllocations() *AdaptiveAllocations { return r } -// true - type AdaptiveAllocationsVariant interface { AdaptiveAllocationsCaster() *AdaptiveAllocations } diff --git a/typedapi/types/adaptiveallocationssettings.go b/typedapi/types/adaptiveallocationssettings.go index b308b4e01d..5eaa430f65 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AdaptiveAllocationsSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L109-L125 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L109-L125 type AdaptiveAllocationsSettings struct { // Enabled If true, adaptive_allocations is enabled Enabled bool `json:"enabled"` @@ -117,8 +117,6 @@ func NewAdaptiveAllocationsSettings() *AdaptiveAllocationsSettings { return r } -// true - type AdaptiveAllocationsSettingsVariant interface { AdaptiveAllocationsSettingsCaster() *AdaptiveAllocationsSettings } diff --git a/typedapi/types/adaptiveselection.go b/typedapi/types/adaptiveselection.go index ef2f02364a..d2ac559ac7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AdaptiveSelection type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L439-L468 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6b1836bcb0..3d8f276937 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AddAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/update_aliases/types.ts#L41-L95 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/update_aliases/types.ts#L41-L95 type AddAction struct { // Alias Alias for the action. // Index alias names support date math. @@ -197,8 +197,6 @@ func NewAddAction() *AddAction { return r } -// true - type AddActionVariant interface { AddActionCaster() *AddAction } diff --git a/typedapi/types/indicesblockstatus.go b/typedapi/types/addindicesblockstatus.go similarity index 76% rename from typedapi/types/indicesblockstatus.go rename to typedapi/types/addindicesblockstatus.go index 3bb123b054..53d5ad8a3b 100644 --- a/typedapi/types/indicesblockstatus.go +++ b/typedapi/types/addindicesblockstatus.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,15 +29,15 @@ import ( "strconv" ) -// IndicesBlockStatus type. +// AddIndicesBlockStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/add_block/IndicesAddBlockResponse.ts#L30-L33 -type IndicesBlockStatus struct { +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/add_block/IndicesAddBlockResponse.ts#L30-L33 +type AddIndicesBlockStatus struct { Blocked bool `json:"blocked"` Name string `json:"name"` } -func (s *IndicesBlockStatus) UnmarshalJSON(data []byte) error { +func (s *AddIndicesBlockStatus) UnmarshalJSON(data []byte) error { dec := json.NewDecoder(bytes.NewReader(data)) @@ -76,11 +76,9 @@ func (s *IndicesBlockStatus) UnmarshalJSON(data []byte) error { return nil } -// NewIndicesBlockStatus returns a IndicesBlockStatus. -func NewIndicesBlockStatus() *IndicesBlockStatus { - r := &IndicesBlockStatus{} +// NewAddIndicesBlockStatus returns a AddIndicesBlockStatus. +func NewAddIndicesBlockStatus() *AddIndicesBlockStatus { + r := &AddIndicesBlockStatus{} return r } - -// false diff --git a/typedapi/types/adjacencymatrixaggregate.go b/typedapi/types/adjacencymatrixaggregate.go index d28924e047..d8315862ac 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // AdjacencyMatrixAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L647-L652 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bce7ee1d3e..99cb4f61e0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AdjacencyMatrixAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L60-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L60-L70 type AdjacencyMatrixAggregation struct { // Filters Filters used to create buckets. // At least one filter is required. @@ -89,8 +89,6 @@ func NewAdjacencyMatrixAggregation() *AdjacencyMatrixAggregation { return r } -// true - type AdjacencyMatrixAggregationVariant interface { AdjacencyMatrixAggregationCaster() *AdjacencyMatrixAggregation } diff --git a/typedapi/types/adjacencymatrixbucket.go b/typedapi/types/adjacencymatrixbucket.go index 645b717535..95278bf64f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // AdjacencyMatrixBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L654-L656 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ec749d9afa..72b08b39be 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -93,5 +93,5 @@ package types // MatrixStatsAggregate // GeoLineAggregate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L38-L125 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L38-L125 type Aggregate any diff --git a/typedapi/types/aggregatemetricdoubleproperty.go b/typedapi/types/aggregatemetricdoubleproperty.go index a7f32af776..4b6d78d7bc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,12 +35,13 @@ import ( // AggregateMetricDoubleProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/complex.ts#L59-L64 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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, @@ -825,8 +853,6 @@ func NewAggregateMetricDoubleProperty() *AggregateMetricDoubleProperty { return r } -// true - type AggregateMetricDoublePropertyVariant interface { AggregateMetricDoublePropertyCaster() *AggregateMetricDoubleProperty } @@ -834,3 +860,8 @@ type AggregateMetricDoublePropertyVariant interface { func (s *AggregateMetricDoubleProperty) AggregateMetricDoublePropertyCaster() *AggregateMetricDoubleProperty { return s } + +func (s *AggregateMetricDoubleProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/aggregateorder.go b/typedapi/types/aggregateorder.go index 5b189d8941..80a1500733 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // map[string]sortorder.SortOrder // []map[string]sortorder.SortOrder // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1052-L1054 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1052-L1054 type AggregateOrder any type AggregateOrderVariant interface { diff --git a/typedapi/types/aggregateoutput.go b/typedapi/types/aggregateoutput.go index 69627b11a0..f92b34eaab 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // AggregateOutput type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/types.ts#L101-L106 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L101-L106 type AggregateOutput struct { Exponent *Weights `json:"exponent,omitempty"` LogisticRegression *Weights `json:"logistic_regression,omitempty"` @@ -37,8 +37,6 @@ func NewAggregateOutput() *AggregateOutput { return r } -// true - type AggregateOutputVariant interface { AggregateOutputCaster() *AggregateOutput } diff --git a/typedapi/types/aggregationbreakdown.go b/typedapi/types/aggregationbreakdown.go index 454227b550..19eb48deb5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AggregationBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L26-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bc70987868..7c0cf301de 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AggregationProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L85-L92 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 df682d8422..410f221476 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AggregationProfileDebug type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L42-L76 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c83c97b352..796f122cf8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AggregationProfileDelegateDebugFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L78-L83 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fd831a0e74..4589a35830 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AggregationRange type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L691-L704 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L691-L704 type AggregationRange struct { // From Start of the range (inclusive). From *Float64 `json:"from,omitempty"` @@ -90,8 +90,6 @@ func NewAggregationRange() *AggregationRange { return r } -// true - type AggregationRangeVariant interface { AggregationRangeCaster() *AggregationRange } diff --git a/typedapi/types/aggregations.go b/typedapi/types/aggregations.go index 5c280a22c4..a06d4da294 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Aggregations type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/AggregationContainer.ts#L107-L533 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -814,8 +814,6 @@ func NewAggregations() *Aggregations { return r } -// true - type AggregationsVariant interface { AggregationsCaster() *Aggregations } diff --git a/typedapi/types/alias.go b/typedapi/types/alias.go index a759a3aaca..0fd0286cb2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Alias type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/Alias.ts#L23-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -125,8 +125,6 @@ func NewAlias() *Alias { return r } -// true - type AliasVariant interface { AliasCaster() *Alias } diff --git a/typedapi/types/aliasdefinition.go b/typedapi/types/aliasdefinition.go index d60fe15ecd..79f6a14184 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AliasDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/AliasDefinition.ts#L22-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -146,8 +146,6 @@ func NewAliasDefinition() *AliasDefinition { return r } -// true - type AliasDefinitionVariant interface { AliasDefinitionCaster() *AliasDefinition } diff --git a/typedapi/types/aliasesrecord.go b/typedapi/types/aliasesrecord.go index 0b1611518a..2649a05084 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AliasesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/aliases/types.ts#L22-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2e3d94c8e7..85b72c75ba 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AlibabaCloudServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L219-L264 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -150,8 +150,6 @@ func NewAlibabaCloudServiceSettings() *AlibabaCloudServiceSettings { return r } -// true - type AlibabaCloudServiceSettingsVariant interface { AlibabaCloudServiceSettingsCaster() *AlibabaCloudServiceSettings } diff --git a/typedapi/types/alibabacloudtasksettings.go b/typedapi/types/alibabacloudtasksettings.go index 205072007e..b66cb49232 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AlibabaCloudTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L266-L280 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -101,8 +101,6 @@ func NewAlibabaCloudTaskSettings() *AlibabaCloudTaskSettings { return r } -// true - type AlibabaCloudTaskSettingsVariant interface { AlibabaCloudTaskSettingsCaster() *AlibabaCloudTaskSettings } diff --git a/typedapi/types/allfield.go b/typedapi/types/allfield.go index b443ec5c9c..578aac3830 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AllField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/meta-fields.ts#L29-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L29-L40 type AllField struct { Analyzer string `json:"analyzer"` Enabled bool `json:"enabled"` @@ -206,8 +206,6 @@ func NewAllField() *AllField { return r } -// true - type AllFieldVariant interface { AllFieldCaster() *AllField } diff --git a/typedapi/types/allocateaction.go b/typedapi/types/allocateaction.go index 6f23a9528f..d59516c219 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AllocateAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L133-L139 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L133-L139 type AllocateAction struct { Exclude map[string]string `json:"exclude,omitempty"` Include map[string]string `json:"include,omitempty"` @@ -127,8 +127,6 @@ func NewAllocateAction() *AllocateAction { return r } -// true - type AllocateActionVariant interface { AllocateActionCaster() *AllocateAction } diff --git a/typedapi/types/allocationdecision.go b/typedapi/types/allocationdecision.go index e9920195ce..70406b4681 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // AllocationDecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/types.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1d2b340752..eba33c0647 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AllocationRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/allocation/types.ts#L25-L99 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 51a6ed18e8..0470f80c48 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AllocationStore type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/types.ts#L40-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5e8e89c544..f1c7970170 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // AlwaysCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Conditions.ts#L26-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L26-L26 type AlwaysCondition struct { } @@ -33,8 +33,6 @@ func NewAlwaysCondition() *AlwaysCondition { return r } -// true - type AlwaysConditionVariant interface { AlwaysConditionCaster() *AlwaysCondition } diff --git a/typedapi/types/amazonbedrockservicesettings.go b/typedapi/types/amazonbedrockservicesettings.go index 223d503054..5c83b9de98 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AmazonBedrockServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L293-L335 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -159,8 +159,6 @@ func NewAmazonBedrockServiceSettings() *AmazonBedrockServiceSettings { return r } -// true - type AmazonBedrockServiceSettingsVariant interface { AmazonBedrockServiceSettingsCaster() *AmazonBedrockServiceSettings } diff --git a/typedapi/types/amazonbedrocktasksettings.go b/typedapi/types/amazonbedrocktasksettings.go index d4e3e97ecc..53f76ae299 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AmazonBedrockTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L337-L361 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -148,8 +148,6 @@ func NewAmazonBedrockTaskSettings() *AmazonBedrockTaskSettings { return r } -// true - type AmazonBedrockTaskSettingsVariant interface { AmazonBedrockTaskSettingsCaster() *AmazonBedrockTaskSettings } diff --git a/typedapi/types/amazonsagemakerservicesettings.go b/typedapi/types/amazonsagemakerservicesettings.go new file mode 100644 index 0000000000..93ec8cf6b5 --- /dev/null +++ b/typedapi/types/amazonsagemakerservicesettings.go @@ -0,0 +1,228 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/amazonsagemakerapi" +) + +// AmazonSageMakerServiceSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type AmazonSageMakerServiceSettingsVariant interface { + AmazonSageMakerServiceSettingsCaster() *AmazonSageMakerServiceSettings +} + +func (s *AmazonSageMakerServiceSettings) AmazonSageMakerServiceSettingsCaster() *AmazonSageMakerServiceSettings { + return s +} diff --git a/typedapi/types/amazonsagemakertasksettings.go b/typedapi/types/amazonsagemakertasksettings.go new file mode 100644 index 0000000000..34fbcf4716 --- /dev/null +++ b/typedapi/types/amazonsagemakertasksettings.go @@ -0,0 +1,149 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// AmazonSageMakerTaskSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type AmazonSageMakerTaskSettingsVariant interface { + AmazonSageMakerTaskSettingsCaster() *AmazonSageMakerTaskSettings +} + +func (s *AmazonSageMakerTaskSettings) AmazonSageMakerTaskSettingsCaster() *AmazonSageMakerTaskSettings { + return s +} diff --git a/typedapi/types/analysisconfig.go b/typedapi/types/analysisconfig.go index ef9fee6153..5e42a13174 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnalysisConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Analysis.ts#L29-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -235,8 +235,6 @@ func NewAnalysisConfig() *AnalysisConfig { return r } -// true - type AnalysisConfigVariant interface { AnalysisConfigCaster() *AnalysisConfig } diff --git a/typedapi/types/analysisconfigread.go b/typedapi/types/analysisconfigread.go index ebf03a7e0d..3387810449 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnalysisConfigRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Analysis.ts#L79-L148 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 737ce090b1..9423b8ea5c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnalysisLimits type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Analysis.ts#L161-L172 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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, @@ -105,8 +105,6 @@ func NewAnalysisLimits() *AnalysisLimits { return r } -// true - type AnalysisLimitsVariant interface { AnalysisLimitsCaster() *AnalysisLimits } diff --git a/typedapi/types/analysismemorylimit.go b/typedapi/types/analysismemorylimit.go index c25d002577..cb408c912b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnalysisMemoryLimit type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Analysis.ts#L174-L179 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -79,8 +79,6 @@ func NewAnalysisMemoryLimit() *AnalysisMemoryLimit { return r } -// true - type AnalysisMemoryLimitVariant interface { AnalysisMemoryLimitCaster() *AnalysisMemoryLimit } diff --git a/typedapi/types/analytics.go b/typedapi/types/analytics.go index 9728966cc3..f370e9a295 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Analytics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L340-L342 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b0270663db..86e8c14213 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // AnalyticsCollection type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/_types/BehavioralAnalytics.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7c1a6dfce5..85bd7f74d4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnalyticsStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L58-L68 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 25fbb05840..c7515da212 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnalyzeDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/analyze/types.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3108078602..62b2b8106f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -72,7 +72,7 @@ package types // TurkishAnalyzer // ThaiAnalyzer // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L427-L480 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L427-L480 type Analyzer any type AnalyzerVariant interface { diff --git a/typedapi/types/analyzerdetail.go b/typedapi/types/analyzerdetail.go index d11c8b399f..a30035f8d0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnalyzerDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/analyze/types.ts#L32-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ac6f7bf56d..ebb183b205 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnalyzeToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/analyze/types.ts#L37-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0a2983201a..ae23a1fff3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Anomaly type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Anomaly.ts#L24-L121 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c9f5a66f5c..bde01c1e9d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnomalyCause type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Anomaly.ts#L123-L139 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 21e9f2f04e..0c5d4e034c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnomalyDetectors type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/info/types.ts#L46-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ae8193dcb7..ba68338345 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnomalyExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Anomaly.ts#L157-L198 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f8287f1c23..424a42794b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnthropicServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L372-L388 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L588-L604 type AnthropicServiceSettings struct { // ApiKey A valid API key for the Anthropic API. ApiKey string `json:"api_key"` @@ -101,8 +101,6 @@ func NewAnthropicServiceSettings() *AnthropicServiceSettings { return r } -// true - type AnthropicServiceSettingsVariant interface { AnthropicServiceSettingsCaster() *AnthropicServiceSettings } diff --git a/typedapi/types/anthropictasksettings.go b/typedapi/types/anthropictasksettings.go index 4b7ecf1e2a..096981877b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AnthropicTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L390-L415 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -146,8 +146,6 @@ func NewAnthropicTaskSettings() *AnthropicTaskSettings { return r } -// true - type AnthropicTaskSettingsVariant interface { AnthropicTaskSettingsCaster() *AnthropicTaskSettings } diff --git a/typedapi/types/apikey.go b/typedapi/types/apikey.go index 4ae3ddc568..d3ae354a9d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ApiKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/ApiKey.ts#L27-L113 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cd0e176eb8..9a165d2f04 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,5 +36,5 @@ package types // DateRangeAggregate // CompositeAggregate // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_api_keys/types.ts#L122-L139 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6834cc07c4..e759df9aab 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ApiKeyAggregationContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_api_keys/types.ts#L63-L120 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/query_api_keys/types.ts#L63-L120 type ApiKeyAggregationContainer struct { AdditionalApiKeyAggregationContainerProperty map[string]json.RawMessage `json:"-"` // Aggregations Sub-aggregations for this aggregation. @@ -197,8 +197,6 @@ func NewApiKeyAggregationContainer() *ApiKeyAggregationContainer { return r } -// true - type ApiKeyAggregationContainerVariant interface { ApiKeyAggregationContainerCaster() *ApiKeyAggregationContainer } diff --git a/typedapi/types/apikeyauthorization.go b/typedapi/types/apikeyauthorization.go index 9a96ae6ea3..06aa4f5e24 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ApiKeyAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Authorization.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 234f56fd6e..2ed1bfd665 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ApiKeyFiltersAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_api_keys/types.ts#L207-L227 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -133,8 +133,6 @@ func NewApiKeyFiltersAggregation() *ApiKeyFiltersAggregation { return r } -// true - type ApiKeyFiltersAggregationVariant interface { ApiKeyFiltersAggregationCaster() *ApiKeyFiltersAggregation } diff --git a/typedapi/types/apikeyquerycontainer.go b/typedapi/types/apikeyquerycontainer.go index 4fd6515185..dba61f75e5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ApiKeyQueryContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_api_keys/types.ts#L141-L205 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -221,8 +221,6 @@ func NewApiKeyQueryContainer() *ApiKeyQueryContainer { return r } -// true - type ApiKeyQueryContainerVariant interface { ApiKeyQueryContainerCaster() *ApiKeyQueryContainer } diff --git a/typedapi/types/apostrophetokenfilter.go b/typedapi/types/apostrophetokenfilter.go new file mode 100644 index 0000000000..cf87cb214d --- /dev/null +++ b/typedapi/types/apostrophetokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ApostropheTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type ApostropheTokenFilterVariant interface { + ApostropheTokenFilterCaster() *ApostropheTokenFilter +} + +func (s *ApostropheTokenFilter) ApostropheTokenFilterCaster() *ApostropheTokenFilter { + return s +} + +func (s *ApostropheTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/appendprocessor.go b/typedapi/types/appendprocessor.go index 4598fa7daf..6e282db4dd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AppendProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L329-L344 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L329-L344 type AppendProcessor struct { // AllowDuplicates If `false`, the processor does not append values already present in the // field. @@ -165,8 +165,6 @@ func NewAppendProcessor() *AppendProcessor { return r } -// true - type AppendProcessorVariant interface { AppendProcessorCaster() *AppendProcessor } diff --git a/typedapi/types/applicationglobaluserprivileges.go b/typedapi/types/applicationglobaluserprivileges.go index b7f61f6d3e..db2bf7ccb8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ApplicationGlobalUserPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L436-L438 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L436-L438 type ApplicationGlobalUserPrivileges struct { Manage ManageUserPrivileges `json:"manage"` } @@ -34,8 +34,6 @@ func NewApplicationGlobalUserPrivileges() *ApplicationGlobalUserPrivileges { return r } -// true - type ApplicationGlobalUserPrivilegesVariant interface { ApplicationGlobalUserPrivilegesCaster() *ApplicationGlobalUserPrivileges } diff --git a/typedapi/types/applicationprivileges.go b/typedapi/types/applicationprivileges.go index 24189c2a4d..54a70b598f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ApplicationPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L27-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -91,8 +91,6 @@ func NewApplicationPrivileges() *ApplicationPrivileges { return r } -// true - type ApplicationPrivilegesVariant interface { ApplicationPrivilegesCaster() *ApplicationPrivileges } diff --git a/typedapi/types/applicationprivilegescheck.go b/typedapi/types/applicationprivilegescheck.go index 78a2955f87..16bf6b3680 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ApplicationPrivilegesCheck type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/has_privileges/types.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/has_privileges/types.ts#L24-L32 type ApplicationPrivilegesCheck struct { // Application The name of the application. Application string `json:"application"` @@ -92,8 +92,6 @@ func NewApplicationPrivilegesCheck() *ApplicationPrivilegesCheck { return r } -// true - type ApplicationPrivilegesCheckVariant interface { ApplicationPrivilegesCheckCaster() *ApplicationPrivilegesCheck } diff --git a/typedapi/types/applicationsprivileges.go b/typedapi/types/applicationsprivileges.go index a39d54670b..a7da8252c3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ApplicationsPrivileges type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/has_privileges/types.ts#L47-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 265a3fb28a..de49bee8e1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // ArabicAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L72-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L72-L77 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": @@ -119,8 +108,6 @@ func NewArabicAnalyzer() *ArabicAnalyzer { return r } -// true - type ArabicAnalyzerVariant interface { ArabicAnalyzerCaster() *ArabicAnalyzer } @@ -128,3 +115,8 @@ type ArabicAnalyzerVariant interface { func (s *ArabicAnalyzer) ArabicAnalyzerCaster() *ArabicAnalyzer { return s } + +func (s *ArabicAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/arabicnormalizationtokenfilter.go b/typedapi/types/arabicnormalizationtokenfilter.go new file mode 100644 index 0000000000..c7549a723a --- /dev/null +++ b/typedapi/types/arabicnormalizationtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ArabicNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type ArabicNormalizationTokenFilterVariant interface { + ArabicNormalizationTokenFilterCaster() *ArabicNormalizationTokenFilter +} + +func (s *ArabicNormalizationTokenFilter) ArabicNormalizationTokenFilterCaster() *ArabicNormalizationTokenFilter { + return s +} + +func (s *ArabicNormalizationTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/arabicstemtokenfilter.go b/typedapi/types/arabicstemtokenfilter.go new file mode 100644 index 0000000000..c95fc75297 --- /dev/null +++ b/typedapi/types/arabicstemtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ArabicStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type ArabicStemTokenFilterVariant interface { + ArabicStemTokenFilterCaster() *ArabicStemTokenFilter +} + +func (s *ArabicStemTokenFilter) ArabicStemTokenFilterCaster() *ArabicStemTokenFilter { + return s +} + +func (s *ArabicStemTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/archive.go b/typedapi/types/archive.go index 313b54671a..68d837f5be 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Archive type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L45-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 07558292fe..0144bebad5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // ArmenianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L79-L84 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L79-L84 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": @@ -119,8 +108,6 @@ func NewArmenianAnalyzer() *ArmenianAnalyzer { return r } -// true - type ArmenianAnalyzerVariant interface { ArmenianAnalyzerCaster() *ArmenianAnalyzer } @@ -128,3 +115,8 @@ type ArmenianAnalyzerVariant interface { func (s *ArmenianAnalyzer) ArmenianAnalyzerCaster() *ArmenianAnalyzer { return s } + +func (s *ArmenianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/arraycomparecondition.go b/typedapi/types/arraycomparecondition.go index d0482db99f..5b19f7fad5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ArrayCompareCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Conditions.ts#L33-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L33-L40 type ArrayCompareCondition struct { ArrayCompareCondition map[conditionop.ConditionOp]ArrayCompareOpParams `json:"-"` Path string `json:"path"` @@ -127,8 +127,6 @@ func NewArrayCompareCondition() *ArrayCompareCondition { return r } -// true - type ArrayCompareConditionVariant interface { ArrayCompareConditionCaster() *ArrayCompareCondition } diff --git a/typedapi/types/arraycompareopparams.go b/typedapi/types/arraycompareopparams.go index b547c78378..5039db3b16 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // ArrayCompareOpParams type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Conditions.ts#L28-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L28-L31 type ArrayCompareOpParams struct { Quantifier quantifier.Quantifier `json:"quantifier"` Value FieldValue `json:"value"` @@ -75,8 +75,6 @@ func NewArrayCompareOpParams() *ArrayCompareOpParams { return r } -// true - type ArrayCompareOpParamsVariant interface { ArrayCompareOpParamsCaster() *ArrayCompareOpParams } diff --git a/typedapi/types/arraypercentilesitem.go b/typedapi/types/arraypercentilesitem.go index bb192036ce..a36b3408a9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ArrayPercentilesItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L162-L166 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5c19859cfc..4ecb1df93c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,8 +30,9 @@ import ( // AsciiFoldingTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L169-L172 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -93,8 +94,6 @@ func NewAsciiFoldingTokenFilter() *AsciiFoldingTokenFilter { return r } -// true - type AsciiFoldingTokenFilterVariant interface { AsciiFoldingTokenFilterCaster() *AsciiFoldingTokenFilter } @@ -102,3 +101,8 @@ type AsciiFoldingTokenFilterVariant interface { func (s *AsciiFoldingTokenFilter) AsciiFoldingTokenFilterCaster() *AsciiFoldingTokenFilter { return s } + +func (s *AsciiFoldingTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/asyncsearch.go b/typedapi/types/asyncsearch.go index 9ead71362f..197c7566dc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // AsyncSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/async_search/_types/AsyncSearch.ts#L30-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 831a8b5651..cc9fd4e236 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AttachmentProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L346-L387 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L346-L387 type AttachmentProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -220,8 +220,6 @@ func NewAttachmentProcessor() *AttachmentProcessor { return r } -// true - type AttachmentProcessorVariant interface { AttachmentProcessorCaster() *AttachmentProcessor } diff --git a/typedapi/types/audit.go b/typedapi/types/audit.go index 36b04e1493..eb86d8c53e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Audit type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L70-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 15338b0846..6b9e9be697 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // AuthenticateApiKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/authenticate/SecurityAuthenticateResponse.ts#L44-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c0fb97ef3a..9a2cf55a32 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AuthenticatedUser type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_token/types.ts#L60-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8fba11b7ef..bd1a8273d3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AuthenticateToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/authenticate/types.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b6691ef104..4ba9f3d58d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Authentication type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L43-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 42fdf941f8..b629d77469 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AuthenticationProvider type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_token/types.ts#L55-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 062fc97515..4b30838243 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AuthenticationRealm type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/delegate_pki/SecurityDelegatePkiResponse.ts#L57-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c74f3d630b..4e020cf0f2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // AutoDateHistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L393-L400 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 080cf152e2..68fb5f9b8e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // AutoDateHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L72-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L72-L110 type AutoDateHistogramAggregation struct { // Buckets The target number of buckets. Buckets *int `json:"buckets,omitempty"` @@ -160,8 +160,6 @@ func NewAutoDateHistogramAggregation() *AutoDateHistogramAggregation { return r } -// true - type AutoDateHistogramAggregationVariant interface { AutoDateHistogramAggregationCaster() *AutoDateHistogramAggregation } diff --git a/typedapi/types/autofollowedcluster.go b/typedapi/types/autofollowedcluster.go index f824f276d2..cf4df00dc3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // AutoFollowedCluster type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/stats/types.ts.ts#L26-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6fca766cfb..2b88bd1c8c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // AutoFollowPattern type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/get_auto_follow_pattern/types.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f94d0e4940..5543a389ed 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AutoFollowPatternSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/get_auto_follow_pattern/types.ts#L28-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 145bfcc886..7b2e04b029 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AutoFollowStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/stats/types.ts.ts#L32-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3115e02e7d..9aeb3ec00e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // AutoscalingCapacity type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L38-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 26c594dd72..9c591e03d7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AutoscalingDecider type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L52-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8cabd4845b..3bc696a77f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // AutoscalingDeciders type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L31-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f4bd3ef8e0..f76d97f92e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // AutoscalingNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L48-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1973897905..a3f8e7a2ec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // AutoscalingPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/autoscaling/_types/AutoscalingPolicy.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/autoscaling/_types/AutoscalingPolicy.ts#L23-L30 type AutoscalingPolicy struct { // Deciders Decider settings. Deciders map[string]json.RawMessage `json:"deciders"` @@ -42,8 +42,6 @@ func NewAutoscalingPolicy() *AutoscalingPolicy { return r } -// true - type AutoscalingPolicyVariant interface { AutoscalingPolicyCaster() *AutoscalingPolicy } diff --git a/typedapi/types/autoscalingresources.go b/typedapi/types/autoscalingresources.go index 052edffd9c..c36e0d9373 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AutoscalingResources type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/autoscaling/get_autoscaling_capacity/GetAutoscalingCapacityResponse.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6aa1439f80..327149200a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L55-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L55-L55 type AverageAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -96,8 +96,6 @@ func NewAverageAggregation() *AverageAggregation { return r } -// true - type AverageAggregationVariant interface { AverageAggregationCaster() *AverageAggregation } diff --git a/typedapi/types/averagebucketaggregation.go b/typedapi/types/averagebucketaggregation.go index 0b09580ff8..4453336494 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // AverageBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -94,8 +94,6 @@ func NewAverageBucketAggregation() *AverageBucketAggregation { return r } -// true - type AverageBucketAggregationVariant interface { AverageBucketAggregationCaster() *AverageBucketAggregation } diff --git a/typedapi/types/avgaggregate.go b/typedapi/types/avgaggregate.go index e2a33d167d..b8c856cd77 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AvgAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L218-L222 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 71da4a0f43..9b08c17232 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AzureAiStudioServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L425-L467 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -153,8 +153,6 @@ func NewAzureAiStudioServiceSettings() *AzureAiStudioServiceSettings { return r } -// true - type AzureAiStudioServiceSettingsVariant interface { AzureAiStudioServiceSettingsCaster() *AzureAiStudioServiceSettings } diff --git a/typedapi/types/azureaistudiotasksettings.go b/typedapi/types/azureaistudiotasksettings.go index 07ad53875a..7869c49aeb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AzureAiStudioTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L469-L497 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -158,8 +158,6 @@ func NewAzureAiStudioTaskSettings() *AzureAiStudioTaskSettings { return r } -// true - type AzureAiStudioTaskSettingsVariant interface { AzureAiStudioTaskSettingsCaster() *AzureAiStudioTaskSettings } diff --git a/typedapi/types/azureopenaiservicesettings.go b/typedapi/types/azureopenaiservicesettings.go index 38da36df9e..544b0ee44f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AzureOpenAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L508-L553 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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`. @@ -162,8 +162,6 @@ func NewAzureOpenAIServiceSettings() *AzureOpenAIServiceSettings { return r } -// true - type AzureOpenAIServiceSettingsVariant interface { AzureOpenAIServiceSettingsCaster() *AzureOpenAIServiceSettings } diff --git a/typedapi/types/azureopenaitasksettings.go b/typedapi/types/azureopenaitasksettings.go index d9a402f7c1..9a3c6946f7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AzureOpenAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L555-L561 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L771-L777 type AzureOpenAITaskSettings struct { // User For a `completion` or `text_embedding` task, specify the user issuing the // request. @@ -78,8 +78,6 @@ func NewAzureOpenAITaskSettings() *AzureOpenAITaskSettings { return r } -// true - type AzureOpenAITaskSettingsVariant interface { AzureOpenAITaskSettingsCaster() *AzureOpenAITaskSettings } diff --git a/typedapi/types/azurerepository.go b/typedapi/types/azurerepository.go index 6dd21d590d..be262954d9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // AzureRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L40-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L40-L50 type AzureRepository struct { // Settings The repository settings. Settings *AzureRepositorySettings `json:"settings,omitempty"` @@ -95,8 +95,6 @@ func NewAzureRepository() *AzureRepository { return r } -// true - type AzureRepositoryVariant interface { AzureRepositoryCaster() *AzureRepository } @@ -104,3 +102,8 @@ type AzureRepositoryVariant interface { func (s *AzureRepository) AzureRepositoryCaster() *AzureRepository { return s } + +func (s *AzureRepository) RepositoryCaster() *Repository { + o := Repository(s) + return &o +} diff --git a/typedapi/types/azurerepositorysettings.go b/typedapi/types/azurerepositorysettings.go index 4f5f7dbe45..6aa6eadaf4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // AzureRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L145-L196 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L145-L196 type AzureRepositorySettings struct { // BasePath The path to the repository data within the container. // It defaults to the root directory. @@ -251,8 +251,6 @@ func NewAzureRepositorySettings() *AzureRepositorySettings { return r } -// true - type AzureRepositorySettingsVariant interface { AzureRepositorySettingsCaster() *AzureRepositorySettings } diff --git a/typedapi/types/base.go b/typedapi/types/base.go index df31202090..3c1db531b9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Base type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d285488a88..c0b5894ed9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // BasqueAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L86-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L86-L91 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": @@ -119,8 +108,6 @@ func NewBasqueAnalyzer() *BasqueAnalyzer { return r } -// true - type BasqueAnalyzerVariant interface { BasqueAnalyzerCaster() *BasqueAnalyzer } @@ -128,3 +115,8 @@ type BasqueAnalyzerVariant interface { func (s *BasqueAnalyzer) BasqueAnalyzerCaster() *BasqueAnalyzer { return s } + +func (s *BasqueAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/bengalianalyzer.go b/typedapi/types/bengalianalyzer.go index 1c5efd5986..92c4e8f759 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // BengaliAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L93-L98 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L93-L98 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": @@ -119,8 +108,6 @@ func NewBengaliAnalyzer() *BengaliAnalyzer { return r } -// true - type BengaliAnalyzerVariant interface { BengaliAnalyzerCaster() *BengaliAnalyzer } @@ -128,3 +115,8 @@ type BengaliAnalyzerVariant interface { func (s *BengaliAnalyzer) BengaliAnalyzerCaster() *BengaliAnalyzer { return s } + +func (s *BengaliAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/bengalinormalizationtokenfilter.go b/typedapi/types/bengalinormalizationtokenfilter.go new file mode 100644 index 0000000000..6d45a6ccfe --- /dev/null +++ b/typedapi/types/bengalinormalizationtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// BengaliNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type BengaliNormalizationTokenFilterVariant interface { + BengaliNormalizationTokenFilterCaster() *BengaliNormalizationTokenFilter +} + +func (s *BengaliNormalizationTokenFilter) BengaliNormalizationTokenFilterCaster() *BengaliNormalizationTokenFilter { + return s +} + +func (s *BengaliNormalizationTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/binaryproperty.go b/typedapi/types/binaryproperty.go index 336171acf3..52bbc64b62 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // BinaryProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L55-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L56-L58 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 { @@ -846,8 +858,6 @@ func NewBinaryProperty() *BinaryProperty { return r } -// true - type BinaryPropertyVariant interface { BinaryPropertyCaster() *BinaryProperty } @@ -855,3 +865,8 @@ type BinaryPropertyVariant interface { func (s *BinaryProperty) BinaryPropertyCaster() *BinaryProperty { return s } + +func (s *BinaryProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/blobdetails.go b/typedapi/types/blobdetails.go index 2b36f4508d..ef869305dc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BlobDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L250-L284 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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/body.go b/typedapi/types/body.go index aa6ab9be5c..74deee5270 100644 --- a/typedapi/types/body.go +++ b/typedapi/types/body.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Body type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/list_queries/ListQueriesResponse.ts#L24-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/list_queries/ListQueriesResponse.ts#L24-L30 type Body struct { Id int64 `json:"id"` Node string `json:"node"` @@ -128,5 +128,3 @@ func NewBody() *Body { return r } - -// false diff --git a/typedapi/types/booleanproperty.go b/typedapi/types/booleanproperty.go index b02683287f..fc26f6216c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // BooleanProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L59-L74 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L60-L75 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 { @@ -952,8 +964,6 @@ func NewBooleanProperty() *BooleanProperty { return r } -// true - type BooleanPropertyVariant interface { BooleanPropertyCaster() *BooleanProperty } @@ -961,3 +971,8 @@ type BooleanPropertyVariant interface { func (s *BooleanProperty) BooleanPropertyCaster() *BooleanProperty { return s } + +func (s *BooleanProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/boolquery.go b/typedapi/types/boolquery.go index ebe6e7d509..414b25c741 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BoolQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L29-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -180,8 +180,6 @@ func NewBoolQuery() *BoolQuery { return r } -// true - type BoolQueryVariant interface { BoolQueryCaster() *BoolQuery } diff --git a/typedapi/types/boostingquery.go b/typedapi/types/boostingquery.go index 12c051dabc..b1be9f4f53 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BoostingQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L58-L74 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -130,8 +130,6 @@ func NewBoostingQuery() *BoostingQuery { return r } -// true - type BoostingQueryVariant interface { BoostingQueryCaster() *BoostingQuery } diff --git a/typedapi/types/boxplotaggregate.go b/typedapi/types/boxplotaggregate.go index f4f7fda80a..3006a1fae1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BoxPlotAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L806-L825 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 33f7b4537f..756408d070 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,16 +27,25 @@ import ( "fmt" "io" "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tdigestexecutionhint" ) // BoxplotAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L57-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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) @@ -103,8 +117,6 @@ func NewBoxplotAggregation() *BoxplotAggregation { return r } -// true - type BoxplotAggregationVariant interface { BoxplotAggregationCaster() *BoxplotAggregation } diff --git a/typedapi/types/braziliananalyzer.go b/typedapi/types/braziliananalyzer.go index a5c20dbf08..a1eb2ae976 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,11 @@ import ( // BrazilianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L100-L104 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L100-L104 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": @@ -112,8 +101,6 @@ func NewBrazilianAnalyzer() *BrazilianAnalyzer { return r } -// true - type BrazilianAnalyzerVariant interface { BrazilianAnalyzerCaster() *BrazilianAnalyzer } @@ -121,3 +108,8 @@ type BrazilianAnalyzerVariant interface { func (s *BrazilianAnalyzer) BrazilianAnalyzerCaster() *BrazilianAnalyzer { return s } + +func (s *BrazilianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/brazilianstemtokenfilter.go b/typedapi/types/brazilianstemtokenfilter.go new file mode 100644 index 0000000000..589076b688 --- /dev/null +++ b/typedapi/types/brazilianstemtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// BrazilianStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type BrazilianStemTokenFilterVariant interface { + BrazilianStemTokenFilterCaster() *BrazilianStemTokenFilter +} + +func (s *BrazilianStemTokenFilter) BrazilianStemTokenFilterCaster() *BrazilianStemTokenFilter { + return s +} + +func (s *BrazilianStemTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/breaker.go b/typedapi/types/breaker.go index 9566c1a235..edf7d88809 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Breaker type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L470-L495 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1c1998257c..b10e22d69f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // BucketCorrelationAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L139-L146 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -75,8 +75,6 @@ func NewBucketCorrelationAggregation() *BucketCorrelationAggregation { return r } -// true - type BucketCorrelationAggregationVariant interface { BucketCorrelationAggregationCaster() *BucketCorrelationAggregation } diff --git a/typedapi/types/bucketcorrelationfunction.go b/typedapi/types/bucketcorrelationfunction.go index a9e776852f..16f3366486 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // BucketCorrelationFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L148-L153 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -36,8 +36,6 @@ func NewBucketCorrelationFunction() *BucketCorrelationFunction { return r } -// true - type BucketCorrelationFunctionVariant interface { BucketCorrelationFunctionCaster() *BucketCorrelationFunction } diff --git a/typedapi/types/bucketcorrelationfunctioncountcorrelation.go b/typedapi/types/bucketcorrelationfunctioncountcorrelation.go index de13299d79..d5d6ebd4b1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // BucketCorrelationFunctionCountCorrelation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L155-L158 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -35,8 +35,6 @@ func NewBucketCorrelationFunctionCountCorrelation() *BucketCorrelationFunctionCo return r } -// true - type BucketCorrelationFunctionCountCorrelationVariant interface { BucketCorrelationFunctionCountCorrelationCaster() *BucketCorrelationFunctionCountCorrelation } diff --git a/typedapi/types/bucketcorrelationfunctioncountcorrelationindicator.go b/typedapi/types/bucketcorrelationfunctioncountcorrelationindicator.go index 37d2f92529..b69a3905ce 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BucketCorrelationFunctionCountCorrelationIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L160-L178 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -105,8 +105,6 @@ func NewBucketCorrelationFunctionCountCorrelationIndicator() *BucketCorrelationF return r } -// true - type BucketCorrelationFunctionCountCorrelationIndicatorVariant interface { BucketCorrelationFunctionCountCorrelationIndicatorCaster() *BucketCorrelationFunctionCountCorrelationIndicator } diff --git a/typedapi/types/bucketinfluencer.go b/typedapi/types/bucketinfluencer.go index 263616f5d8..fc69a1260b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BucketInfluencer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Bucket.ts#L79-L127 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5ef5723d36..85d261bb68 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BucketKsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L103-L137 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -116,8 +116,6 @@ func NewBucketKsAggregation() *BucketKsAggregation { return r } -// true - type BucketKsAggregationVariant interface { BucketKsAggregationCaster() *BucketKsAggregation } diff --git a/typedapi/types/bucketmetricvalueaggregate.go b/typedapi/types/bucketmetricvalueaggregate.go index 07ffb52c90..3936ad7c33 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BucketMetricValueAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L250-L253 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d5cdb9c758..431ff39a48 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]AdjacencyMatrixBucket // []AdjacencyMatrixBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsAdjacencyMatrixBucket any diff --git a/typedapi/types/bucketsapikeyquerycontainer.go b/typedapi/types/bucketsapikeyquerycontainer.go index 166f528e39..5e40c30fc2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // map[string]ApiKeyQueryContainer // []ApiKeyQueryContainer // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsApiKeyQueryContainer any type BucketsApiKeyQueryContainerVariant interface { diff --git a/typedapi/types/bucketscompositebucket.go b/typedapi/types/bucketscompositebucket.go index f4052a0681..e787c357d1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]CompositeBucket // []CompositeBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsCompositeBucket any diff --git a/typedapi/types/bucketscriptaggregation.go b/typedapi/types/bucketscriptaggregation.go index bea69a3b02..74040521c3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // BucketScriptAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L83-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -101,8 +101,6 @@ func NewBucketScriptAggregation() *BucketScriptAggregation { return r } -// true - type BucketScriptAggregationVariant interface { BucketScriptAggregationCaster() *BucketScriptAggregation } diff --git a/typedapi/types/bucketsdatehistogrambucket.go b/typedapi/types/bucketsdatehistogrambucket.go index 025ab16423..749519d8ed 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]DateHistogramBucket // []DateHistogramBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsDateHistogramBucket any diff --git a/typedapi/types/bucketsdoubletermsbucket.go b/typedapi/types/bucketsdoubletermsbucket.go index 2e055a9837..384d783822 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]DoubleTermsBucket // []DoubleTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsDoubleTermsBucket any diff --git a/typedapi/types/bucketselectoraggregation.go b/typedapi/types/bucketselectoraggregation.go index 69768ce73a..14d07c7ca4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // BucketSelectorAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L93-L101 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -101,8 +101,6 @@ func NewBucketSelectorAggregation() *BucketSelectorAggregation { return r } -// true - type BucketSelectorAggregationVariant interface { BucketSelectorAggregationCaster() *BucketSelectorAggregation } diff --git a/typedapi/types/bucketsfiltersbucket.go b/typedapi/types/bucketsfiltersbucket.go index b3450ebf25..c440eed52c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]FiltersBucket // []FiltersBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsFiltersBucket any diff --git a/typedapi/types/bucketsfrequentitemsetsbucket.go b/typedapi/types/bucketsfrequentitemsetsbucket.go index 760a6114ca..0ed7aafa87 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]FrequentItemSetsBucket // []FrequentItemSetsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsFrequentItemSetsBucket any diff --git a/typedapi/types/bucketsgeohashgridbucket.go b/typedapi/types/bucketsgeohashgridbucket.go index 5610e6c1c0..49a8baa87d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]GeoHashGridBucket // []GeoHashGridBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsGeoHashGridBucket any diff --git a/typedapi/types/bucketsgeohexgridbucket.go b/typedapi/types/bucketsgeohexgridbucket.go index 30faaee1ac..614c430bb4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]GeoHexGridBucket // []GeoHexGridBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsGeoHexGridBucket any diff --git a/typedapi/types/bucketsgeotilegridbucket.go b/typedapi/types/bucketsgeotilegridbucket.go index f2e945f646..c8ec99d785 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]GeoTileGridBucket // []GeoTileGridBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsGeoTileGridBucket any diff --git a/typedapi/types/bucketshistogrambucket.go b/typedapi/types/bucketshistogrambucket.go index df4139338e..ec2c542adc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]HistogramBucket // []HistogramBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsHistogramBucket any diff --git a/typedapi/types/bucketsipprefixbucket.go b/typedapi/types/bucketsipprefixbucket.go index 7236e116d8..0ea52705be 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]IpPrefixBucket // []IpPrefixBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsIpPrefixBucket any diff --git a/typedapi/types/bucketsiprangebucket.go b/typedapi/types/bucketsiprangebucket.go index 6233458c61..63deffabcc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]IpRangeBucket // []IpRangeBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsIpRangeBucket any diff --git a/typedapi/types/bucketslongraretermsbucket.go b/typedapi/types/bucketslongraretermsbucket.go index 999ea72da6..286d5e7eb6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]LongRareTermsBucket // []LongRareTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsLongRareTermsBucket any diff --git a/typedapi/types/bucketslongtermsbucket.go b/typedapi/types/bucketslongtermsbucket.go index 6e0ee67c8e..dee4f3acb8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]LongTermsBucket // []LongTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsLongTermsBucket any diff --git a/typedapi/types/bucketsmultitermsbucket.go b/typedapi/types/bucketsmultitermsbucket.go index f8cebccf52..5c283375aa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]MultiTermsBucket // []MultiTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsMultiTermsBucket any diff --git a/typedapi/types/bucketsortaggregation.go b/typedapi/types/bucketsortaggregation.go index f2c7b7e434..c587aec08b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // BucketSortAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L180-L204 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -126,8 +126,6 @@ func NewBucketSortAggregation() *BucketSortAggregation { return r } -// true - type BucketSortAggregationVariant interface { BucketSortAggregationCaster() *BucketSortAggregation } diff --git a/typedapi/types/bucketspath.go b/typedapi/types/bucketspath.go index dbb06fcf2c..2f175fa3f6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ package types // []string // map[string]string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L53-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L53-L59 type BucketsPath any type BucketsPathVariant interface { diff --git a/typedapi/types/bucketsquery.go b/typedapi/types/bucketsquery.go index 15ad0e43a2..fa4ca1d799 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // map[string]Query // []Query // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsQuery any type BucketsQueryVariant interface { diff --git a/typedapi/types/bucketsrangebucket.go b/typedapi/types/bucketsrangebucket.go index 8b58be11d8..5dc406477a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]RangeBucket // []RangeBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsRangeBucket any diff --git a/typedapi/types/bucketssignificantlongtermsbucket.go b/typedapi/types/bucketssignificantlongtermsbucket.go index 18dbfd0829..ceb2f680ad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]SignificantLongTermsBucket // []SignificantLongTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsSignificantLongTermsBucket any diff --git a/typedapi/types/bucketssignificantstringtermsbucket.go b/typedapi/types/bucketssignificantstringtermsbucket.go index f542414dfd..f04349356b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]SignificantStringTermsBucket // []SignificantStringTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsSignificantStringTermsBucket any diff --git a/typedapi/types/bucketsstringraretermsbucket.go b/typedapi/types/bucketsstringraretermsbucket.go index ce650b9b1c..ae46524d1f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]StringRareTermsBucket // []StringRareTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsStringRareTermsBucket any diff --git a/typedapi/types/bucketsstringtermsbucket.go b/typedapi/types/bucketsstringtermsbucket.go index 42c630f813..fd306c9eb3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]StringTermsBucket // []StringTermsBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsStringTermsBucket any diff --git a/typedapi/types/bucketstimeseriesbucket.go b/typedapi/types/bucketstimeseriesbucket.go index 50665329cc..4821f77d37 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]TimeSeriesBucket // []TimeSeriesBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsTimeSeriesBucket any diff --git a/typedapi/types/bucketsummary.go b/typedapi/types/bucketsummary.go index 1a9329093e..2155c80641 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BucketSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Bucket.ts#L30-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 25ea0e0148..dbc3f1d406 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]VariableWidthHistogramBucket // []VariableWidthHistogramBucket // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsVariableWidthHistogramBucket any diff --git a/typedapi/types/bucketsvoid.go b/typedapi/types/bucketsvoid.go index 236cc48fa0..d839ca8eda 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // map[string]any // []any // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L346-L355 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L346-L355 type BucketsVoid any diff --git a/typedapi/types/buildinformation.go b/typedapi/types/buildinformation.go index a60413f520..7acfd62cd1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BuildInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/info/types.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 96669b99df..98f8330afa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // BulgarianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L106-L111 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L106-L111 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": @@ -119,8 +108,6 @@ func NewBulgarianAnalyzer() *BulgarianAnalyzer { return r } -// true - type BulgarianAnalyzerVariant interface { BulgarianAnalyzerCaster() *BulgarianAnalyzer } @@ -128,3 +115,8 @@ type BulgarianAnalyzerVariant interface { func (s *BulgarianAnalyzer) BulgarianAnalyzerCaster() *BulgarianAnalyzer { return s } + +func (s *BulgarianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/bulkerror.go b/typedapi/types/bulkerror.go index 781a747a6b..dc2a62625b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BulkError type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Bulk.ts#L24-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 320f4d7d33..11caa63764 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BulkIndexByScrollFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Errors.ts#L60-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 245b87b559..74ebfdc7b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BulkStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L71-L81 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 98ad3f0909..4635801dd1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // ByteNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L186-L189 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L187-L190 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 { @@ -962,8 +974,6 @@ func NewByteNumberProperty() *ByteNumberProperty { return r } -// true - type ByteNumberPropertyVariant interface { ByteNumberPropertyCaster() *ByteNumberProperty } @@ -971,3 +981,8 @@ type ByteNumberPropertyVariant interface { func (s *ByteNumberProperty) ByteNumberPropertyCaster() *ByteNumberProperty { return s } + +func (s *ByteNumberProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/bytesize.go b/typedapi/types/bytesize.go index 8c2d82a9b1..842904e53b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L90-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L90-L91 type ByteSize any type ByteSizeVariant interface { diff --git a/typedapi/types/bytesprocessor.go b/typedapi/types/bytesprocessor.go index 3f5b09790b..318c02c435 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // BytesProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L556-L572 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L556-L572 type BytesProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -154,8 +154,6 @@ func NewBytesProcessor() *BytesProcessor { return r } -// true - type BytesProcessorVariant interface { BytesProcessorCaster() *BytesProcessor } diff --git a/typedapi/types/cachequeries.go b/typedapi/types/cachequeries.go index b062c44788..e216124cca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CacheQueries type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L421-L423 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L434-L436 type CacheQueries struct { Enabled bool `json:"enabled"` } @@ -77,8 +77,6 @@ func NewCacheQueries() *CacheQueries { return r } -// true - type CacheQueriesVariant interface { CacheQueriesCaster() *CacheQueries } diff --git a/typedapi/types/cachestats.go b/typedapi/types/cachestats.go index f1190cdfc5..665b81ed5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CacheStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/stats/types.ts#L38-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 45c784bd6e..e08e299d7d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Calendar type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_calendars/types.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 932551cf27..00574ebe7b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CalendarEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/CalendarEvent.ts#L24-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/CalendarEvent.ts#L24-L44 type CalendarEvent struct { // CalendarId A string that uniquely identifies a calendar. CalendarId *string `json:"calendar_id,omitempty"` @@ -156,8 +156,6 @@ func NewCalendarEvent() *CalendarEvent { return r } -// true - type CalendarEventVariant interface { CalendarEventCaster() *CalendarEvent } diff --git a/typedapi/types/cardinalityaggregate.go b/typedapi/types/cardinalityaggregate.go index e34582dcd5..eebec5424d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CardinalityAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L140-L143 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 48250620d0..09fa23e69b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // CardinalityAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L87-L99 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -126,8 +126,6 @@ func NewCardinalityAggregation() *CardinalityAggregation { return r } -// true - type CardinalityAggregationVariant interface { CardinalityAggregationCaster() *CardinalityAggregation } diff --git a/typedapi/types/catalananalyzer.go b/typedapi/types/catalananalyzer.go index b2d92095b3..0cf465bb2e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // CatalanAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L113-L118 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L113-L118 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": @@ -119,8 +108,6 @@ func NewCatalanAnalyzer() *CatalanAnalyzer { return r } -// true - type CatalanAnalyzerVariant interface { CatalanAnalyzerCaster() *CatalanAnalyzer } @@ -128,3 +115,8 @@ type CatalanAnalyzerVariant interface { func (s *CatalanAnalyzer) CatalanAnalyzerCaster() *CatalanAnalyzer { return s } + +func (s *CatalanAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/catanonalydetectorcolumns.go b/typedapi/types/catanonalydetectorcolumns.go index 8cef3116c8..e57a9b6800 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,5 +26,5 @@ import ( // CatAnonalyDetectorColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/_types/CatBase.ts#L402-L404 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L402-L404 type CatAnonalyDetectorColumns []catanomalydetectorcolumn.CatAnomalyDetectorColumn diff --git a/typedapi/types/catcomponenttemplate.go b/typedapi/types/catcomponenttemplate.go index fd297cfc97..54152babcf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CatComponentTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/component_templates/types.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5f2c3fdc6c..b22d335ba9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,5 +26,5 @@ import ( // CatDatafeedColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/_types/CatBase.ts#L559-L559 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1284-L1284 type CatDatafeedColumns []catdatafeedcolumn.CatDatafeedColumn diff --git a/typedapi/types/catdfacolumns.go b/typedapi/types/catdfacolumns.go index 968f8f674f..b0acc5a862 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,5 +26,5 @@ import ( // CatDfaColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/_types/CatBase.ts#L558-L558 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1283-L1283 type CatDfaColumns []catdfacolumn.CatDfaColumn diff --git a/typedapi/types/categorizationanalyzer.go b/typedapi/types/categorizationanalyzer.go index 98efcf7f48..4d8dd82de6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // CategorizationAnalyzerDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Analysis.ts#L181-L182 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Analysis.ts#L181-L182 type CategorizationAnalyzer any type CategorizationAnalyzerVariant interface { diff --git a/typedapi/types/categorizationanalyzerdefinition.go b/typedapi/types/categorizationanalyzerdefinition.go index f17d6b8691..49ee8cfc0d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // CategorizationAnalyzerDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Analysis.ts#L184-L198 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -571,8 +733,6 @@ func NewCategorizationAnalyzerDefinition() *CategorizationAnalyzerDefinition { return r } -// true - type CategorizationAnalyzerDefinitionVariant interface { CategorizationAnalyzerDefinitionCaster() *CategorizationAnalyzerDefinition } @@ -580,3 +740,8 @@ type CategorizationAnalyzerDefinitionVariant interface { func (s *CategorizationAnalyzerDefinition) CategorizationAnalyzerDefinitionCaster() *CategorizationAnalyzerDefinition { return s } + +func (s *CategorizationAnalyzerDefinition) CategorizationAnalyzerCaster() *CategorizationAnalyzer { + o := CategorizationAnalyzer(s) + return &o +} diff --git a/typedapi/types/categorizetextaggregation.go b/typedapi/types/categorizetextaggregation.go index bb0e4e3e3c..d09a8fcc14 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CategorizeTextAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1117-L1183 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -270,8 +270,6 @@ func NewCategorizeTextAggregation() *CategorizeTextAggregation { return r } -// true - type CategorizeTextAggregationVariant interface { CategorizeTextAggregationCaster() *CategorizeTextAggregation } diff --git a/typedapi/types/categorizetextanalyzer.go b/typedapi/types/categorizetextanalyzer.go index 9a73e32328..83d3808dcc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // CustomCategorizeTextAnalyzer // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1185-L1188 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1185-L1188 type CategorizeTextAnalyzer any type CategorizeTextAnalyzerVariant interface { diff --git a/typedapi/types/category.go b/typedapi/types/category.go index 8c2158fc4f..dc4e2eddb5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Category type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Category.ts#L23-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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/taskid.go b/typedapi/types/catnodecolumns.go similarity index 67% rename from typedapi/types/taskid.go rename to typedapi/types/catnodecolumns.go index 921bd736f5..300e39aeb5 100644 --- a/typedapi/types/taskid.go +++ b/typedapi/types/catnodecolumns.go @@ -16,14 +16,15 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types -// TaskId holds the union for the following types: -// -// string -// int +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catnodecolumn" +) + +// CatNodeColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L129-L129 -type TaskId any +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..057dac56f5 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catrecoverycolumn" +) + +// CatRecoveryColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..e1fdb9cbc0 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catsegmentscolumn" +) + +// CatSegmentsColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..588b00a7af --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catshardcolumn" +) + +// CatShardColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..053fe27c87 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catsnapshotscolumn" +) + +// CatSnapshotsColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..d4d4d20b3c --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/catthreadpoolcolumn" +) + +// CatThreadPoolColumns type alias. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L2053-L2053 +type CatThreadPoolColumns []catthreadpoolcolumn.CatThreadPoolColumn diff --git a/typedapi/types/cattrainedmodelscolumns.go b/typedapi/types/cattrainedmodelscolumns.go index 8cc8a1736f..062c2c40a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,5 +26,5 @@ import ( // CatTrainedModelsColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/_types/CatBase.ts#L636-L638 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1365-L1367 type CatTrainedModelsColumns []cattrainedmodelscolumn.CatTrainedModelsColumn diff --git a/typedapi/types/cattransformcolumns.go b/typedapi/types/cattransformcolumns.go index a1ef32c6a8..4f833ba1aa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,5 +26,5 @@ import ( // CatTransformColumns type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/_types/CatBase.ts#L845-L845 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cat/_types/CatBase.ts#L1574-L1574 type CatTransformColumns []cattransformcolumn.CatTransformColumn diff --git a/typedapi/types/ccr.go b/typedapi/types/ccr.go index c3603881dd..b264b840ab 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Ccr type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L344-L347 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 09e3e885ab..29cd54ae6b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CcrShardStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/_types/FollowIndexStats.ts#L37-L109 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..a8db810838 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +// CCSStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..1a825f1e42 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CCSUsageClusterStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..69b0a29976 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CCSUsageStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..f9f8eead46 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// CCSUsageTimeValue type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 60f67a34a7..99665f1d89 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CertificateInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ssl/certificates/types.ts#L22-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1f20ebc1d0..b1cfc86379 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Cgroup type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L497-L510 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 56522780ed..0d4b26184f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CgroupCpu type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L523-L540 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a83d2c5ea3..685659f759 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CgroupCpuStat type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L542-L555 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c7a6a5e3d1..8595571f99 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CgroupMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L557-L573 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 91d3ae20d1..34bd7725ff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ChainInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L35-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L35-L37 type ChainInput struct { Inputs []map[string]WatcherInput `json:"inputs"` } @@ -34,8 +34,6 @@ func NewChainInput() *ChainInput { return r } -// true - type ChainInputVariant interface { ChainInputCaster() *ChainInput } diff --git a/typedapi/types/charfilter.go b/typedapi/types/charfilter.go index 8d41409077..d31916a7ca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // CharFilterDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/char_filters.ts#L28-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/char_filters.ts#L28-L33 type CharFilter any type CharFilterVariant interface { diff --git a/typedapi/types/charfilterdefinition.go b/typedapi/types/charfilterdefinition.go index 71b43f5c23..acbc4bbc52 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -28,7 +28,7 @@ package types // IcuNormalizationCharFilter // KuromojiIterationMarkCharFilter // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/char_filters.ts#L35-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/char_filters.ts#L35-L44 type CharFilterDefinition any type CharFilterDefinitionVariant interface { diff --git a/typedapi/types/charfilterdetail.go b/typedapi/types/charfilterdetail.go index 1da3ca21a5..843f9f650a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CharFilterDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/analyze/types.ts#L46-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f131d4b202..1db27d6bc1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // CharFilterTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L228-L261 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7094d9b8b4..5d5fd9ff0d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CharGroupTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L31-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L31-L38 type CharGroupTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` TokenizeOnChars []string `json:"tokenize_on_chars"` @@ -112,8 +112,6 @@ func NewCharGroupTokenizer() *CharGroupTokenizer { return r } -// true - type CharGroupTokenizerVariant interface { CharGroupTokenizerCaster() *CharGroupTokenizer } @@ -121,3 +119,8 @@ type CharGroupTokenizerVariant interface { func (s *CharGroupTokenizer) CharGroupTokenizerCaster() *CharGroupTokenizer { return s } + +func (s *CharGroupTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/checkpointing.go b/typedapi/types/checkpointing.go index f2bdf2c8f8..2210c85bf9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Checkpointing type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/get_transform_stats/types.ts#L102-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e0e5f58137..380dddc5b3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CheckpointStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/get_transform_stats/types.ts#L93-L100 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 44e9abc3fe..f9c43770fb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // ChildrenAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L888-L892 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f9c922a321..23dc8628c1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ChildrenAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L121-L126 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L121-L126 type ChildrenAggregation struct { // Type The child type that should be selected. Type *string `json:"type,omitempty"` @@ -68,8 +68,6 @@ func NewChildrenAggregation() *ChildrenAggregation { return r } -// true - type ChildrenAggregationVariant interface { ChildrenAggregationCaster() *ChildrenAggregation } diff --git a/typedapi/types/chineseanalyzer.go b/typedapi/types/chineseanalyzer.go index 4c10679872..d9485a6c67 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,11 @@ import ( // ChineseAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L120-L124 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L120-L124 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": @@ -112,8 +101,6 @@ func NewChineseAnalyzer() *ChineseAnalyzer { return r } -// true - type ChineseAnalyzerVariant interface { ChineseAnalyzerCaster() *ChineseAnalyzer } @@ -121,3 +108,8 @@ type ChineseAnalyzerVariant interface { func (s *ChineseAnalyzer) ChineseAnalyzerCaster() *ChineseAnalyzer { return s } + +func (s *ChineseAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/chisquareheuristic.go b/typedapi/types/chisquareheuristic.go index 6f49f1b951..8d412cf0eb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ChiSquareHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L782-L791 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -96,8 +96,6 @@ func NewChiSquareHeuristic() *ChiSquareHeuristic { return r } -// true - type ChiSquareHeuristicVariant interface { ChiSquareHeuristicCaster() *ChiSquareHeuristic } diff --git a/typedapi/types/chunkingconfig.go b/typedapi/types/chunkingconfig.go index 70aff5821e..fa2caace4c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // ChunkingConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Datafeed.ts#L251-L264 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -83,8 +83,6 @@ func NewChunkingConfig() *ChunkingConfig { return r } -// true - type ChunkingConfigVariant interface { ChunkingConfigCaster() *ChunkingConfig } diff --git a/typedapi/types/chunkingsettings.go b/typedapi/types/chunkingsettings.go index 3455438818..9d552ccec4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ChunkingSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/ChunkingSettings.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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` @@ -136,8 +136,6 @@ func NewChunkingSettings() *ChunkingSettings { return r } -// true - type ChunkingSettingsVariant interface { ChunkingSettingsCaster() *ChunkingSettings } diff --git a/typedapi/types/circleprocessor.go b/typedapi/types/circleprocessor.go index 5606749ac0..d7db6dae93 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // CircleProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L574-L597 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L574-L597 type CircleProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -185,8 +185,6 @@ func NewCircleProcessor() *CircleProcessor { return r } -// true - type CircleProcessorVariant interface { CircleProcessorCaster() *CircleProcessor } diff --git a/typedapi/types/cjkanalyzer.go b/typedapi/types/cjkanalyzer.go index 00b58b3ea3..adcb95f321 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,11 @@ import ( // CjkAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L126-L130 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L126-L130 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": @@ -112,8 +101,6 @@ func NewCjkAnalyzer() *CjkAnalyzer { return r } -// true - type CjkAnalyzerVariant interface { CjkAnalyzerCaster() *CjkAnalyzer } @@ -121,3 +108,8 @@ type CjkAnalyzerVariant interface { func (s *CjkAnalyzer) CjkAnalyzerCaster() *CjkAnalyzer { return s } + +func (s *CjkAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/cjkbigramtokenfilter.go b/typedapi/types/cjkbigramtokenfilter.go new file mode 100644 index 0000000000..fe4a40b1d1 --- /dev/null +++ b/typedapi/types/cjkbigramtokenfilter.go @@ -0,0 +1,130 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/cjkbigramignoredscript" +) + +// CjkBigramTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type CjkBigramTokenFilterVariant interface { + CjkBigramTokenFilterCaster() *CjkBigramTokenFilter +} + +func (s *CjkBigramTokenFilter) CjkBigramTokenFilterCaster() *CjkBigramTokenFilter { + return s +} + +func (s *CjkBigramTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/cjkwidthtokenfilter.go b/typedapi/types/cjkwidthtokenfilter.go new file mode 100644 index 0000000000..d5562cb3cf --- /dev/null +++ b/typedapi/types/cjkwidthtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// CjkWidthTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type CjkWidthTokenFilterVariant interface { + CjkWidthTokenFilterCaster() *CjkWidthTokenFilter +} + +func (s *CjkWidthTokenFilter) CjkWidthTokenFilterCaster() *CjkWidthTokenFilter { + return s +} + +func (s *CjkWidthTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/classictokenfilter.go b/typedapi/types/classictokenfilter.go new file mode 100644 index 0000000000..18fb74af60 --- /dev/null +++ b/typedapi/types/classictokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ClassicTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type ClassicTokenFilterVariant interface { + ClassicTokenFilterCaster() *ClassicTokenFilter +} + +func (s *ClassicTokenFilter) ClassicTokenFilterCaster() *ClassicTokenFilter { + return s +} + +func (s *ClassicTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/classictokenizer.go b/typedapi/types/classictokenizer.go index 5f90c21ca9..10fc50c9ba 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClassicTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L40-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L40-L46 type ClassicTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` @@ -105,8 +105,6 @@ func NewClassicTokenizer() *ClassicTokenizer { return r } -// true - type ClassicTokenizerVariant interface { ClassicTokenizerCaster() *ClassicTokenizer } @@ -114,3 +112,8 @@ type ClassicTokenizerVariant interface { func (s *ClassicTokenizer) ClassicTokenizerCaster() *ClassicTokenizer { return s } + +func (s *ClassicTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/classificationinferenceoptions.go b/typedapi/types/classificationinferenceoptions.go index 85ce9756ea..50e6f716c2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClassificationInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L118-L133 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -144,8 +144,6 @@ func NewClassificationInferenceOptions() *ClassificationInferenceOptions { return r } -// true - type ClassificationInferenceOptionsVariant interface { ClassificationInferenceOptionsCaster() *ClassificationInferenceOptions } diff --git a/typedapi/types/cleanuprepositoryresults.go b/typedapi/types/cleanuprepositoryresults.go index 9fcd999744..ffa3867234 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CleanupRepositoryResults type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L29-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/cleanup_repository/SnapshotCleanupRepositoryResponse.ts#L29-L37 type CleanupRepositoryResults struct { // DeletedBlobs The number of binary large objects (blobs) removed from the snapshot // repository during cleanup operations. @@ -98,5 +98,3 @@ func NewCleanupRepositoryResults() *CleanupRepositoryResults { return r } - -// false diff --git a/typedapi/types/client.go b/typedapi/types/client.go index 9388cc19fe..73b61909d2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Client type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L720-L767 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 18295ab957..55a05654c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CloseIndexResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/close/CloseIndexResponse.ts#L32-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2328407069..11fd137c08 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // CloseShardResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/close/CloseIndexResponse.ts#L37-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7f234b4d58..d0ef457644 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ClusterAppliedStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L221-L223 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 55d88b31f9..4fffa1379f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ClusterComponentTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/_types/ComponentTemplate.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/_types/ComponentTemplate.ts#L28-L31 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 124b4936d1..8bfcfe4103 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ClusterDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L45-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 58b6b26a41..1cdfcbbacc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,19 +31,42 @@ import ( // ClusterFileSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L34-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d6e8e01e47..f4790da28e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ClusterIndexingPressure type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L570-L572 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b306bd0dde..9dd2b63ff9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,27 +31,37 @@ import ( // ClusterIndices type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L74-L107 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9facf6337a..1fac4b3bba 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterIndicesShards type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L60-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 275c2fe274..b14b518f66 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ClusterIndicesShardsIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L51-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 26dc219903..25b3f9321a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ClusterInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/types.ts#L49-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e93d32f276..1220a46179 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,5 +26,5 @@ import ( // ClusterInfoTargets type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L386-L386 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L388-L388 type ClusterInfoTargets []clusterinfotarget.ClusterInfoTarget diff --git a/typedapi/types/clusteringest.go b/typedapi/types/clusteringest.go index 394523250c..229ea020c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L270-L273 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ae7ad0e9d3..e7a29f3aae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,8 +31,10 @@ import ( // ClusterJvm type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L275-L292 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 651a6cffdf..f3f93937e9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,16 @@ import ( // ClusterJvmMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L294-L303 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cef3465faa..40c3270f24 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterJvmVersion type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L305-L335 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 25958d4c5d..59d19d702b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ClusterNetworkTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L337-L346 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5730f207a6..8a4838d190 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ClusterNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/ClusterNode.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c741221f4e..83d0b4651b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,22 +31,24 @@ import ( // ClusterNodeCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L348-L367 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 158425336c..8181e2a159 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ClusterNodes type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L369-L402 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 74e310cf77..d63e75b433 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L415-L442 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cb11ddefd5..a5e6d9aaea 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystemArchitecture type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L404-L413 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6a917c2c6b..c797e165c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystemName type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L444-L453 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7bfff7284d..9c4a50e152 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterOperatingSystemPrettyName type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L455-L464 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e7e519f194..8c5e033079 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ClusterProcess type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L466-L475 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5695a1137e..eb7a278668 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterProcessCpu type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L477-L483 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5ca56c0a37..483d1b7f73 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterProcessOpenFileDescriptors type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L485-L501 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 85a7529236..41e42ea13d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L503-L509 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cfa0833a00..1f7fe86e6a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // ClusterRemoteSniffInfo // ClusterRemoteProxyInfo // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L29-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L29-L30 type ClusterRemoteInfo any diff --git a/typedapi/types/clusterremoteproxyinfo.go b/typedapi/types/clusterremoteproxyinfo.go index a04b33f49a..6c232c1261 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterRemoteProxyInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L58-L83 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 45b1182db8..5f23d3798a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterRemoteSniffInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/remote_info/ClusterRemoteInfoResponse.ts#L32-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 400140832a..03f220d08b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterRuntimeFieldTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L169-L226 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ddf4ec874e..571ca374d9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterShardMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L511-L524 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..709db85493 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +// ClusterSnapshotStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4be1eba1df..ceb7bb76bb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterStateQueue type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L248-L261 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 419e7c6b0e..693c0d9590 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterStateUpdate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L278-L343 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0fa4f3cd02..6f8d60ac02 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ClusterStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L27-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1a8404f572..7ce0eacffb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // CohereServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L572-L613 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -141,8 +145,6 @@ func NewCohereServiceSettings() *CohereServiceSettings { return r } -// true - type CohereServiceSettingsVariant interface { CohereServiceSettingsCaster() *CohereServiceSettings } diff --git a/typedapi/types/coheretasksettings.go b/typedapi/types/coheretasksettings.go index 2e7c99b0b5..d274a8efc0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // CohereTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L650-L682 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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: @@ -136,8 +136,6 @@ func NewCohereTaskSettings() *CohereTaskSettings { return r } -// true - type CohereTaskSettingsVariant interface { CohereTaskSettingsCaster() *CohereTaskSettings } diff --git a/typedapi/types/collector.go b/typedapi/types/collector.go index 92265eb360..32b3f55e66 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Collector type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L94-L99 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dd5445ded7..cd707d190f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Column type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/sql/_types/types.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/sql/_types/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 ec833a9589..6b9f1f223e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // CombinedFieldsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/abstractions.ts#L472-L506 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/abstractions.ts#L472-L506 type CombinedFieldsQuery struct { // AutoGenerateSynonymsPhraseQuery If true, match phrase queries are automatically created for multi-term // synonyms. @@ -163,8 +163,6 @@ func NewCombinedFieldsQuery() *CombinedFieldsQuery { return r } -// true - type CombinedFieldsQueryVariant interface { CombinedFieldsQueryCaster() *CombinedFieldsQuery } diff --git a/typedapi/types/command.go b/typedapi/types/command.go index 5e6eccdb3d..5bb0083fb1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Command type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/reroute/types.ts#L22-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -67,8 +67,6 @@ func NewCommand() *Command { return r } -// true - type CommandVariant interface { CommandCaster() *Command } diff --git a/typedapi/types/commandallocateprimaryaction.go b/typedapi/types/commandallocateprimaryaction.go index 3481b19e1e..7b284385dc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CommandAllocatePrimaryAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/reroute/types.ts#L78-L84 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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, @@ -116,8 +116,6 @@ func NewCommandAllocatePrimaryAction() *CommandAllocatePrimaryAction { return r } -// true - type CommandAllocatePrimaryActionVariant interface { CommandAllocatePrimaryActionCaster() *CommandAllocatePrimaryAction } diff --git a/typedapi/types/commandallocatereplicaaction.go b/typedapi/types/commandallocatereplicaaction.go index 5342ad5929..58c1257014 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CommandAllocateReplicaAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/reroute/types.ts#L69-L76 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/types.ts#L69-L76 type CommandAllocateReplicaAction struct { Index string `json:"index"` Node string `json:"node"` @@ -98,8 +98,6 @@ func NewCommandAllocateReplicaAction() *CommandAllocateReplicaAction { return r } -// true - type CommandAllocateReplicaActionVariant interface { CommandAllocateReplicaActionCaster() *CommandAllocateReplicaAction } diff --git a/typedapi/types/commandcancelaction.go b/typedapi/types/commandcancelaction.go index 783f4dfc51..f44fcd78cd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CommandCancelAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/reroute/types.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/types.ts#L45-L50 type CommandCancelAction struct { AllowPrimary *bool `json:"allow_primary,omitempty"` Index string `json:"index"` @@ -113,8 +113,6 @@ func NewCommandCancelAction() *CommandCancelAction { return r } -// true - type CommandCancelActionVariant interface { CommandCancelActionCaster() *CommandCancelAction } diff --git a/typedapi/types/commandmoveaction.go b/typedapi/types/commandmoveaction.go index d315e17608..3a32525dfa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CommandMoveAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/reroute/types.ts#L60-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/reroute/types.ts#L60-L67 type CommandMoveAction struct { // FromNode The node to move the shard from FromNode string `json:"from_node"` @@ -113,8 +113,6 @@ func NewCommandMoveAction() *CommandMoveAction { return r } -// true - type CommandMoveActionVariant interface { CommandMoveActionCaster() *CommandMoveAction } diff --git a/typedapi/types/commongramstokenfilter.go b/typedapi/types/commongramstokenfilter.go index 3ae1d6fe41..ac51ab64ca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,14 +31,29 @@ import ( // CommonGramsTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L174-L180 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -140,8 +155,6 @@ func NewCommonGramsTokenFilter() *CommonGramsTokenFilter { return r } -// true - type CommonGramsTokenFilterVariant interface { CommonGramsTokenFilterCaster() *CommonGramsTokenFilter } @@ -149,3 +162,8 @@ type CommonGramsTokenFilterVariant interface { func (s *CommonGramsTokenFilter) CommonGramsTokenFilterCaster() *CommonGramsTokenFilter { return s } + +func (s *CommonGramsTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/commontermsquery.go b/typedapi/types/commontermsquery.go index fffcaa9297..e06c463616 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // CommonTermsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L34-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -172,8 +172,6 @@ func NewCommonTermsQuery() *CommonTermsQuery { return r } -// true - type CommonTermsQueryVariant interface { CommonTermsQueryCaster() *CommonTermsQuery } diff --git a/typedapi/types/communityidprocessor.go b/typedapi/types/communityidprocessor.go index 741b51c202..9c9fed162d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CommunityIDProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L599-L660 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L599-L660 type CommunityIDProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -225,8 +225,6 @@ func NewCommunityIDProcessor() *CommunityIDProcessor { return r } -// true - type CommunityIDProcessorVariant interface { CommunityIDProcessorCaster() *CommunityIDProcessor } diff --git a/typedapi/types/compactnodeinfo.go b/typedapi/types/compactnodeinfo.go index 00fb328394..25667e3426 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // CompactNodeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L33-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/verify_repository/SnapshotVerifyRepositoryResponse.ts#L33-L40 type CompactNodeInfo struct { // Name A human-readable name for the node. // You can set this name using the `node.name` property in `elasticsearch.yml`. @@ -69,5 +69,3 @@ func NewCompactNodeInfo() *CompactNodeInfo { return r } - -// false diff --git a/typedapi/types/completioncontext.go b/typedapi/types/completioncontext.go index d322ee0edd..fbd42508b6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CompletionContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L236-L265 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L236-L265 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. @@ -130,8 +130,6 @@ func NewCompletionContext() *CompletionContext { return r } -// true - type CompletionContextVariant interface { CompletionContextCaster() *CompletionContext } diff --git a/typedapi/types/completionproperty.go b/typedapi/types/completionproperty.go index e1bd05ba4f..7506b67eaa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // CompletionProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/specialized.ts#L33-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -931,8 +943,6 @@ func NewCompletionProperty() *CompletionProperty { return r } -// true - type CompletionPropertyVariant interface { CompletionPropertyCaster() *CompletionProperty } @@ -940,3 +950,8 @@ type CompletionPropertyVariant interface { func (s *CompletionProperty) CompletionPropertyCaster() *CompletionProperty { return s } + +func (s *CompletionProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/completionresult.go b/typedapi/types/completionresult.go index 16f8914940..797de8ad6a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CompletionResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/Results.ts#L77-L82 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d0bf2b94a6..f6d437f144 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CompletionStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L83-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f9dcc5009f..e342d240a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CompletionSuggest type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L49-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L49-L56 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 3d54e43e00..f505ff2932 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CompletionSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L164-L182 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L164-L182 type CompletionSuggester struct { // Analyzer The analyzer to analyze the suggest text with. // Defaults to the search analyzer of the suggest field. @@ -164,8 +164,6 @@ func NewCompletionSuggester() *CompletionSuggester { return r } -// true - type CompletionSuggesterVariant interface { CompletionSuggesterCaster() *CompletionSuggester } diff --git a/typedapi/types/completionsuggestoption.go b/typedapi/types/completionsuggestoption.go index d41788c70d..b2aa8f4b44 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CompletionSuggestOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L74-L85 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L74-L85 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 ba58100710..1218d1e057 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CompletionTool type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L205-L217 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L278-L290 type CompletionTool struct { // Function The function definition. Function CompletionToolFunction `json:"function"` @@ -83,8 +83,6 @@ func NewCompletionTool() *CompletionTool { return r } -// true - type CompletionToolVariant interface { CompletionToolCaster() *CompletionTool } diff --git a/typedapi/types/completiontoolchoice.go b/typedapi/types/completiontoolchoice.go index dea9ebc8cb..08faa0aeae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CompletionToolChoice type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L168-L180 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L241-L253 type CompletionToolChoice struct { // Function The tool choice function. Function CompletionToolChoiceFunction `json:"function"` @@ -83,8 +83,6 @@ func NewCompletionToolChoice() *CompletionToolChoice { return r } -// true - type CompletionToolChoiceVariant interface { CompletionToolChoiceCaster() *CompletionToolChoice } @@ -92,3 +90,8 @@ type CompletionToolChoiceVariant interface { func (s *CompletionToolChoice) CompletionToolChoiceCaster() *CompletionToolChoice { return s } + +func (s *CompletionToolChoice) CompletionToolTypeCaster() *CompletionToolType { + o := CompletionToolType(s) + return &o +} diff --git a/typedapi/types/completiontoolchoicefunction.go b/typedapi/types/completiontoolchoicefunction.go index f678f6f950..eaf31e3453 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CompletionToolChoiceFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L157-L166 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L230-L239 type CompletionToolChoiceFunction struct { // Name The name of the function to call. Name string `json:"name"` @@ -76,8 +76,6 @@ func NewCompletionToolChoiceFunction() *CompletionToolChoiceFunction { return r } -// true - type CompletionToolChoiceFunctionVariant interface { CompletionToolChoiceFunctionCaster() *CompletionToolChoiceFunction } diff --git a/typedapi/types/completiontoolfunction.go b/typedapi/types/completiontoolfunction.go index 9480f76517..869a60a79f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CompletionToolFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L182-L203 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -115,8 +115,6 @@ func NewCompletionToolFunction() *CompletionToolFunction { return r } -// true - type CompletionToolFunctionVariant interface { CompletionToolFunctionCaster() *CompletionToolFunction } diff --git a/typedapi/types/completiontooltype.go b/typedapi/types/completiontooltype.go index 458ec4eed4..f33ff018ad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // CompletionToolChoice // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L79-L82 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L118-L121 type CompletionToolType any type CompletionToolTypeVariant interface { diff --git a/typedapi/types/componenttemplatenode.go b/typedapi/types/componenttemplatenode.go index cabc115f2e..be5868b5b6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ComponentTemplateNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/_types/ComponentTemplate.ts#L32-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/_types/ComponentTemplate.ts#L33-L42 type ComponentTemplateNode struct { Deprecated *bool `json:"deprecated,omitempty"` Meta_ Metadata `json:"_meta,omitempty"` @@ -95,8 +95,6 @@ func NewComponentTemplateNode() *ComponentTemplateNode { return r } -// true - type ComponentTemplateNodeVariant interface { ComponentTemplateNodeCaster() *ComponentTemplateNode } diff --git a/typedapi/types/componenttemplatesummary.go b/typedapi/types/componenttemplatesummary.go index 6e826a7021..bdb1ff4efc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,14 +30,15 @@ import ( // ComponentTemplateSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/_types/ComponentTemplate.ts#L43-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/_types/ComponentTemplate.ts#L44-L61 type ComponentTemplateSummary struct { - Aliases map[string]AliasDefinition `json:"aliases,omitempty"` - Lifecycle *DataStreamLifecycleWithRollover `json:"lifecycle,omitempty"` - Mappings *TypeMapping `json:"mappings,omitempty"` - Meta_ Metadata `json:"_meta,omitempty"` - Settings map[string]IndexSettings `json:"settings,omitempty"` - Version *int64 `json:"version,omitempty"` + Aliases map[string]AliasDefinition `json:"aliases,omitempty"` + DataStreamOptions *DataStreamOptionsTemplate `json:"data_stream_options,omitempty"` + Lifecycle *DataStreamLifecycleWithRollover `json:"lifecycle,omitempty"` + Mappings *TypeMapping `json:"mappings,omitempty"` + Meta_ Metadata `json:"_meta,omitempty"` + Settings map[string]IndexSettings `json:"settings,omitempty"` + Version *int64 `json:"version,omitempty"` } func (s *ComponentTemplateSummary) UnmarshalJSON(data []byte) error { @@ -63,6 +64,11 @@ func (s *ComponentTemplateSummary) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Aliases", err) } + case "data_stream_options": + if err := dec.Decode(&s.DataStreamOptions); err != nil { + return fmt.Errorf("%s | %w", "DataStreamOptions", err) + } + case "lifecycle": if err := dec.Decode(&s.Lifecycle); err != nil { return fmt.Errorf("%s | %w", "Lifecycle", err) @@ -106,8 +112,6 @@ func NewComponentTemplateSummary() *ComponentTemplateSummary { return r } -// true - type ComponentTemplateSummaryVariant interface { ComponentTemplateSummaryCaster() *ComponentTemplateSummary } diff --git a/typedapi/types/compositeaggregate.go b/typedapi/types/compositeaggregate.go index f82f2075a2..09bdaed509 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // CompositeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L698-L703 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a055f00bfe..f7b03fd4a2 100644 --- a/typedapi/types/compositeaggregatekey.go +++ b/typedapi/types/compositeaggregatekey.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // CompositeAggregateKey type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L128-L128 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L128-L128 type CompositeAggregateKey map[string]FieldValue type CompositeAggregateKeyVariant interface { diff --git a/typedapi/types/compositeaggregation.go b/typedapi/types/compositeaggregation.go index 8c4f856c47..54465bd2fa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CompositeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L130-L149 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -96,8 +96,6 @@ func NewCompositeAggregation() *CompositeAggregation { return r } -// true - type CompositeAggregationVariant interface { CompositeAggregationCaster() *CompositeAggregation } diff --git a/typedapi/types/compositeaggregationsource.go b/typedapi/types/compositeaggregationsource.go index 1521e95805..df0970055e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // CompositeAggregationSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L151-L168 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L151-L168 type CompositeAggregationSource struct { // DateHistogram A date histogram aggregation. DateHistogram *CompositeDateHistogramAggregation `json:"date_histogram,omitempty"` @@ -41,8 +41,6 @@ func NewCompositeAggregationSource() *CompositeAggregationSource { return r } -// true - type CompositeAggregationSourceVariant interface { CompositeAggregationSourceCaster() *CompositeAggregationSource } diff --git a/typedapi/types/compositebucket.go b/typedapi/types/compositebucket.go index e3b4e1857a..d347bf9b6c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // CompositeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L705-L707 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 be370a3727..58e2b8eaeb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // CompositeDateHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L187-L195 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -152,8 +152,6 @@ func NewCompositeDateHistogramAggregation() *CompositeDateHistogramAggregation { return r } -// true - type CompositeDateHistogramAggregationVariant interface { CompositeDateHistogramAggregationCaster() *CompositeDateHistogramAggregation } diff --git a/typedapi/types/compositegeotilegridaggregation.go b/typedapi/types/compositegeotilegridaggregation.go index 5a57040d60..3b6362de11 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // CompositeGeoTileGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L197-L200 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L197-L200 type CompositeGeoTileGridAggregation struct { Bounds GeoBounds `json:"bounds,omitempty"` // Field Either `field` or `script` must be present @@ -194,8 +194,6 @@ func NewCompositeGeoTileGridAggregation() *CompositeGeoTileGridAggregation { return r } -// true - type CompositeGeoTileGridAggregationVariant interface { CompositeGeoTileGridAggregationCaster() *CompositeGeoTileGridAggregation } diff --git a/typedapi/types/compositehistogramaggregation.go b/typedapi/types/compositehistogramaggregation.go index 4e6910d741..12361e453d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // CompositeHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L183-L185 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L183-L185 type CompositeHistogramAggregation struct { // Field Either `field` or `script` must be present Field *string `json:"field,omitempty"` @@ -130,8 +130,6 @@ func NewCompositeHistogramAggregation() *CompositeHistogramAggregation { return r } -// true - type CompositeHistogramAggregationVariant interface { CompositeHistogramAggregationCaster() *CompositeHistogramAggregation } diff --git a/typedapi/types/compositesubfield.go b/typedapi/types/compositesubfield.go index 00770f4b59..3525a40039 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // CompositeSubField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/RuntimeFields.ts#L52-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/RuntimeFields.ts#L52-L54 type CompositeSubField struct { Type runtimefieldtype.RuntimeFieldType `json:"type"` } @@ -38,8 +38,6 @@ func NewCompositeSubField() *CompositeSubField { return r } -// true - type CompositeSubFieldVariant interface { CompositeSubFieldCaster() *CompositeSubField } diff --git a/typedapi/types/compositetermsaggregation.go b/typedapi/types/compositetermsaggregation.go index 36e906e840..deb51840ae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // CompositeTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L181-L181 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L181-L181 type CompositeTermsAggregation struct { // Field Either `field` or `script` must be present Field *string `json:"field,omitempty"` @@ -113,8 +113,6 @@ func NewCompositeTermsAggregation() *CompositeTermsAggregation { return r } -// true - type CompositeTermsAggregationVariant interface { CompositeTermsAggregationCaster() *CompositeTermsAggregation } diff --git a/typedapi/types/conditiontokenfilter.go b/typedapi/types/conditiontokenfilter.go index b23d0b192c..6d0e87777c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,12 +30,17 @@ import ( // ConditionTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L182-L186 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -100,8 +105,6 @@ func NewConditionTokenFilter() *ConditionTokenFilter { return r } -// true - type ConditionTokenFilterVariant interface { ConditionTokenFilterCaster() *ConditionTokenFilter } @@ -109,3 +112,8 @@ type ConditionTokenFilterVariant interface { func (s *ConditionTokenFilter) ConditionTokenFilterCaster() *ConditionTokenFilter { return s } + +func (s *ConditionTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/configuration.go b/typedapi/types/configuration.go index 6d577c5b27..bc92da8322 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Configuration type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/_types/SnapshotLifecycle.ts#L109-L139 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -159,8 +159,6 @@ func NewConfiguration() *Configuration { return r } -// true - type ConfigurationVariant interface { ConfigurationCaster() *Configuration } diff --git a/typedapi/types/confusionmatrixitem.go b/typedapi/types/confusionmatrixitem.go index 759cb167a4..0fd0b1680f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ConfusionMatrixItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L125-L130 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0a5aa3196f..ab4b7975d9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ConfusionMatrixPrediction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L132-L135 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b726f90787..c4a830f64a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ConfusionMatrixThreshold type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L137-L158 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9dea874c00..ca91ba3385 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Connection type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/graph/_types/Connection.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 65e555340a..a837f3aab4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // Connector type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L252-L284 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L252-L284 type Connector struct { ApiKeyId *string `json:"api_key_id,omitempty"` ApiKeySecretId *string `json:"api_key_secret_id,omitempty"` @@ -360,5 +360,3 @@ func NewConnector() *Connector { return r } - -// false diff --git a/typedapi/types/connectorconfigproperties.go b/typedapi/types/connectorconfigproperties.go index 3b6a20fbb5..a2830cf2b4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // ConnectorConfigProperties type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L83-L99 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L83-L99 type ConnectorConfigProperties struct { Category *string `json:"category,omitempty"` DefaultValue ScalarValue `json:"default_value"` @@ -260,8 +260,6 @@ func NewConnectorConfigProperties() *ConnectorConfigProperties { return r } -// true - type ConnectorConfigPropertiesVariant interface { ConnectorConfigPropertiesCaster() *ConnectorConfigProperties } diff --git a/typedapi/types/connectorconfiguration.go b/typedapi/types/connectorconfiguration.go index 9abc0ab10f..cca98d3028 100644 --- a/typedapi/types/connectorconfiguration.go +++ b/typedapi/types/connectorconfiguration.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ConnectorConfiguration type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L101-L104 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L101-L104 type ConnectorConfiguration map[string]ConnectorConfigProperties type ConnectorConfigurationVariant interface { diff --git a/typedapi/types/connectorcustomscheduling.go b/typedapi/types/connectorcustomscheduling.go index 9a4efb2388..00633dad94 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ConnectorCustomScheduling type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L128-L128 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d0b3fdb1bc..d39ecbd47d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ConnectorFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L230-L244 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -40,8 +40,6 @@ func NewConnectorFeatures() *ConnectorFeatures { return r } -// true - type ConnectorFeaturesVariant interface { ConnectorFeaturesCaster() *ConnectorFeatures } diff --git a/typedapi/types/connectorscheduling.go b/typedapi/types/connectorscheduling.go index 4fc84c3f6e..6971045979 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ConnectorScheduling type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L106-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L106-L110 type ConnectorScheduling struct { Enabled bool `json:"enabled"` // Interval The interval is expressed using the crontab syntax @@ -91,8 +91,6 @@ func NewConnectorScheduling() *ConnectorScheduling { return r } -// true - type ConnectorSchedulingVariant interface { ConnectorSchedulingCaster() *ConnectorScheduling } diff --git a/typedapi/types/connectorsyncjob.go b/typedapi/types/connectorsyncjob.go index c3f149162e..a6b111f570 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // ConnectorSyncJob type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/SyncJob.ts#L53-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5bfb36c2d0..9bad7eadfb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // ConstantKeywordProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/specialized.ts#L50-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -803,8 +815,6 @@ func NewConstantKeywordProperty() *ConstantKeywordProperty { return r } -// true - type ConstantKeywordPropertyVariant interface { ConstantKeywordPropertyCaster() *ConstantKeywordProperty } @@ -812,3 +822,8 @@ type ConstantKeywordPropertyVariant interface { func (s *ConstantKeywordProperty) ConstantKeywordPropertyCaster() *ConstantKeywordProperty { return s } + +func (s *ConstantKeywordProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/constantscorequery.go b/typedapi/types/constantscorequery.go index aa91442832..11aabad1b4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ConstantScoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L76-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -107,8 +107,6 @@ func NewConstantScoreQuery() *ConstantScoreQuery { return r } -// true - type ConstantScoreQueryVariant interface { ConstantScoreQueryCaster() *ConstantScoreQuery } diff --git a/typedapi/types/contentobject.go b/typedapi/types/contentobject.go index 01c1e449ff..a5dea12d4b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ContentObject type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L84-L96 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L123-L135 type ContentObject struct { // Text The text content. Text string `json:"text"` @@ -90,8 +90,6 @@ func NewContentObject() *ContentObject { return r } -// true - type ContentObjectVariant interface { ContentObjectCaster() *ContentObject } diff --git a/typedapi/types/context.go b/typedapi/types/context.go index ba2f4f6315..7ee2e9a139 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // GeoLocation // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L229-L234 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L229-L234 type Context any type ContextVariant interface { diff --git a/typedapi/types/contextmethod.go b/typedapi/types/contextmethod.go index aa031924b5..40527f5915 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ContextMethod type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/get_script_context/types.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2c57cbce23..003a975782 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ContextMethodParam type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/get_script_context/types.ts#L33-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1f7b956dff..9056bcbc26 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ConvertProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L673-L693 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L673-L693 type ConvertProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -163,8 +163,6 @@ func NewConvertProcessor() *ConvertProcessor { return r } -// true - type ConvertProcessorVariant interface { ConvertProcessorCaster() *ConvertProcessor } diff --git a/typedapi/types/coordinatorstats.go b/typedapi/types/coordinatorstats.go index a756d7bb3d..4ef7d3ca8b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CoordinatorStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/stats/types.ts#L30-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d7d3da6a6b..4342bed2fd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CoordsGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L154-L159 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L154-L159 type CoordsGeoBounds struct { Bottom Float64 `json:"bottom"` Left Float64 `json:"left"` @@ -130,8 +130,6 @@ func NewCoordsGeoBounds() *CoordsGeoBounds { return r } -// true - type CoordsGeoBoundsVariant interface { CoordsGeoBoundsCaster() *CoordsGeoBounds } @@ -139,3 +137,8 @@ type CoordsGeoBoundsVariant interface { func (s *CoordsGeoBounds) CoordsGeoBoundsCaster() *CoordsGeoBounds { return s } + +func (s *CoordsGeoBounds) GeoBoundsCaster() *GeoBounds { + o := GeoBounds(s) + return &o +} diff --git a/typedapi/types/countedkeywordproperty.go b/typedapi/types/countedkeywordproperty.go index 22170e9faa..f33ff14b66 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // CountedKeywordProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/specialized.ts#L55-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -812,8 +824,6 @@ func NewCountedKeywordProperty() *CountedKeywordProperty { return r } -// true - type CountedKeywordPropertyVariant interface { CountedKeywordPropertyCaster() *CountedKeywordProperty } @@ -821,3 +831,8 @@ type CountedKeywordPropertyVariant interface { func (s *CountedKeywordProperty) CountedKeywordPropertyCaster() *CountedKeywordProperty { return s } + +func (s *CountedKeywordProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/counter.go b/typedapi/types/counter.go index af9a9aec7e..e2c409a78d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Counter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L32-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 04ddacf72a..b03a8840b0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CountRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/count/types.ts#L23-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d79d11f0a4..5746cf560a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Cpu type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L575-L584 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9ceadcd126..33858a0ff6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CpuAcct type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L512-L521 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8b8e5fcea3..f31b360210 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CreatedStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/CreatedStatus.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f7884ce132..fe6f7ccf32 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CreateFrom type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/create_from/MigrateCreateFromRequest.ts#L46-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -92,8 +92,6 @@ func NewCreateFrom() *CreateFrom { return r } -// true - type CreateFromVariant interface { CreateFromCaster() *CreateFrom } diff --git a/typedapi/types/createoperation.go b/typedapi/types/createoperation.go index 2d1c2efb3d..ff24127529 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // CreateOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/bulk/types.ts#L140-L140 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -170,8 +170,6 @@ func NewCreateOperation() *CreateOperation { return r } -// true - type CreateOperationVariant interface { CreateOperationCaster() *CreateOperation } diff --git a/typedapi/types/csvprocessor.go b/typedapi/types/csvprocessor.go index df6aa4367e..982d95e922 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CsvProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L695-L728 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L695-L728 type CsvProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -218,8 +218,6 @@ func NewCsvProcessor() *CsvProcessor { return r } -// true - type CsvProcessorVariant interface { CsvProcessorCaster() *CsvProcessor } diff --git a/typedapi/types/cumulativecardinalityaggregate.go b/typedapi/types/cumulativecardinalityaggregate.go index 84db0ac39e..c27b1a99ae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CumulativeCardinalityAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L856-L864 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9c0827294f..37a4e2b499 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // CumulativeCardinalityAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L206-L209 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -94,8 +94,6 @@ func NewCumulativeCardinalityAggregation() *CumulativeCardinalityAggregation { return r } -// true - type CumulativeCardinalityAggregationVariant interface { CumulativeCardinalityAggregationCaster() *CumulativeCardinalityAggregation } diff --git a/typedapi/types/cumulativesumaggregation.go b/typedapi/types/cumulativesumaggregation.go index 4b5a65e05e..36045fa128 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // CumulativeSumAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L211-L214 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -94,8 +94,6 @@ func NewCumulativeSumAggregation() *CumulativeSumAggregation { return r } -// true - type CumulativeSumAggregationVariant interface { CumulativeSumAggregationCaster() *CumulativeSumAggregation } diff --git a/typedapi/types/currentnode.go b/typedapi/types/currentnode.go index a48206e5eb..dc792dc60b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // CurrentNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/types.ts#L79-L90 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 31f430786d..356f068908 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CustomAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L28-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L28-L35 type CustomAnalyzer struct { CharFilter []string `json:"char_filter,omitempty"` Filter []string `json:"filter,omitempty"` @@ -166,8 +166,6 @@ func NewCustomAnalyzer() *CustomAnalyzer { return r } -// true - type CustomAnalyzerVariant interface { CustomAnalyzerCaster() *CustomAnalyzer } @@ -175,3 +173,8 @@ type CustomAnalyzerVariant interface { func (s *CustomAnalyzer) CustomAnalyzerCaster() *CustomAnalyzer { return s } + +func (s *CustomAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/customcategorizetextanalyzer.go b/typedapi/types/customcategorizetextanalyzer.go index 0210f55a10..182e8eb792 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CustomCategorizeTextAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1190-L1194 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1190-L1194 type CustomCategorizeTextAnalyzer struct { CharFilter []string `json:"char_filter,omitempty"` Filter []string `json:"filter,omitempty"` @@ -87,8 +87,6 @@ func NewCustomCategorizeTextAnalyzer() *CustomCategorizeTextAnalyzer { return r } -// true - type CustomCategorizeTextAnalyzerVariant interface { CustomCategorizeTextAnalyzerCaster() *CustomCategorizeTextAnalyzer } @@ -96,3 +94,8 @@ type CustomCategorizeTextAnalyzerVariant interface { func (s *CustomCategorizeTextAnalyzer) CustomCategorizeTextAnalyzerCaster() *CustomCategorizeTextAnalyzer { return s } + +func (s *CustomCategorizeTextAnalyzer) CategorizeTextAnalyzerCaster() *CategorizeTextAnalyzer { + o := CategorizeTextAnalyzer(s) + return &o +} diff --git a/typedapi/types/customnormalizer.go b/typedapi/types/customnormalizer.go index 59e8dea2c0..d835d44ebb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // CustomNormalizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/normalizers.ts#L30-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/normalizers.ts#L30-L34 type CustomNormalizer struct { CharFilter []string `json:"char_filter,omitempty"` Filter []string `json:"filter,omitempty"` @@ -54,8 +54,6 @@ func NewCustomNormalizer() *CustomNormalizer { return r } -// true - type CustomNormalizerVariant interface { CustomNormalizerCaster() *CustomNormalizer } @@ -63,3 +61,8 @@ type CustomNormalizerVariant interface { func (s *CustomNormalizer) CustomNormalizerCaster() *CustomNormalizer { return s } + +func (s *CustomNormalizer) NormalizerCaster() *Normalizer { + o := Normalizer(s) + return &o +} diff --git a/typedapi/types/customrequestparams.go b/typedapi/types/customrequestparams.go new file mode 100644 index 0000000000..02b2ccfb43 --- /dev/null +++ b/typedapi/types/customrequestparams.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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CustomRequestParams type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type CustomRequestParamsVariant interface { + CustomRequestParamsCaster() *CustomRequestParams +} + +func (s *CustomRequestParams) CustomRequestParamsCaster() *CustomRequestParams { + return s +} diff --git a/typedapi/types/customresponseparams.go b/typedapi/types/customresponseparams.go new file mode 100644 index 0000000000..8a95e52a68 --- /dev/null +++ b/typedapi/types/customresponseparams.go @@ -0,0 +1,182 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "encoding/json" +) + +// CustomResponseParams type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type CustomResponseParamsVariant interface { + CustomResponseParamsCaster() *CustomResponseParams +} + +func (s *CustomResponseParams) CustomResponseParamsCaster() *CustomResponseParams { + return s +} diff --git a/typedapi/types/customscheduling.go b/typedapi/types/customscheduling.go index 1ccbd09c4d..d5c2f617e2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CustomScheduling type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L120-L126 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c69d57ffe2..c2ef549955 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // CustomSchedulingConfigurationOverrides type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L112-L118 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..bdaff22da8 --- /dev/null +++ b/typedapi/types/customservicesettings.go @@ -0,0 +1,182 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// CustomServiceSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type CustomServiceSettingsVariant interface { + CustomServiceSettingsCaster() *CustomServiceSettings +} + +func (s *CustomServiceSettings) CustomServiceSettingsCaster() *CustomServiceSettings { + return s +} diff --git a/typedapi/types/customtasksettings.go b/typedapi/types/customtasksettings.go new file mode 100644 index 0000000000..9413e1c706 --- /dev/null +++ b/typedapi/types/customtasksettings.go @@ -0,0 +1,60 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "encoding/json" +) + +// CustomTaskSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type CustomTaskSettingsVariant interface { + CustomTaskSettingsCaster() *CustomTaskSettings +} + +func (s *CustomTaskSettings) CustomTaskSettingsCaster() *CustomTaskSettings { + return s +} diff --git a/typedapi/types/czechanalyzer.go b/typedapi/types/czechanalyzer.go index 014cf449e1..7281038c26 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // CzechAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L132-L137 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L132-L137 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": @@ -119,8 +108,6 @@ func NewCzechAnalyzer() *CzechAnalyzer { return r } -// true - type CzechAnalyzerVariant interface { CzechAnalyzerCaster() *CzechAnalyzer } @@ -128,3 +115,8 @@ type CzechAnalyzerVariant interface { func (s *CzechAnalyzer) CzechAnalyzerCaster() *CzechAnalyzer { return s } + +func (s *CzechAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/czechstemtokenfilter.go b/typedapi/types/czechstemtokenfilter.go new file mode 100644 index 0000000000..296ac8e79f --- /dev/null +++ b/typedapi/types/czechstemtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// CzechStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type CzechStemTokenFilterVariant interface { + CzechStemTokenFilterCaster() *CzechStemTokenFilter +} + +func (s *CzechStemTokenFilter) CzechStemTokenFilterCaster() *CzechStemTokenFilter { + return s +} + +func (s *CzechStemTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/dailyschedule.go b/typedapi/types/dailyschedule.go index 0b6d8dd6da..770eef6198 100644 --- a/typedapi/types/dailyschedule.go +++ b/typedapi/types/dailyschedule.go @@ -16,17 +16,50 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + // DailySchedule type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Schedule.ts#L33-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L33-L35 type DailySchedule struct { At []ScheduleTimeOfDay `json:"at"` } +func (s *DailySchedule) 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 "at": + if err := dec.Decode(&s.At); err != nil { + return fmt.Errorf("%s | %w", "At", err) + } + + } + } + return nil +} + // NewDailySchedule returns a DailySchedule. func NewDailySchedule() *DailySchedule { r := &DailySchedule{} @@ -34,8 +67,6 @@ func NewDailySchedule() *DailySchedule { return r } -// true - type DailyScheduleVariant interface { DailyScheduleCaster() *DailySchedule } diff --git a/typedapi/types/danglingindex.go b/typedapi/types/danglingindex.go index ed00c9bcc8..29ca10b939 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DanglingIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/dangling_indices/list_dangling_indices/ListDanglingIndicesResponse.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 884246b9c1..dbe99dbf8e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,11 @@ import ( // DanishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L139-L143 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L139-L143 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": @@ -112,8 +101,6 @@ func NewDanishAnalyzer() *DanishAnalyzer { return r } -// true - type DanishAnalyzerVariant interface { DanishAnalyzerCaster() *DanishAnalyzer } @@ -121,3 +108,8 @@ type DanishAnalyzerVariant interface { func (s *DanishAnalyzer) DanishAnalyzerCaster() *DanishAnalyzer { return s } + +func (s *DanishAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/databaseconfiguration.go b/typedapi/types/databaseconfiguration.go index de9fd523ee..e885d0601a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DatabaseConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Database.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Database.ts#L22-L37 type DatabaseConfiguration struct { AdditionalDatabaseConfigurationProperty map[string]json.RawMessage `json:"-"` Ipinfo *Ipinfo `json:"ipinfo,omitempty"` @@ -125,8 +125,6 @@ func NewDatabaseConfiguration() *DatabaseConfiguration { return r } -// true - type DatabaseConfigurationVariant interface { DatabaseConfigurationCaster() *DatabaseConfiguration } diff --git a/typedapi/types/databaseconfigurationfull.go b/typedapi/types/databaseconfigurationfull.go index eabea50fa6..9452e1deac 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DatabaseConfigurationFull type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Database.ts#L39-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9e8063b740..f9439171ae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Job.ts#L352-L372 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7e438a164b..aa3255972a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataDescription type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Job.ts#L374-L390 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -118,8 +118,6 @@ func NewDataDescription() *DataDescription { return r } -// true - type DataDescriptionVariant interface { DataDescriptionCaster() *DataDescription } diff --git a/typedapi/types/dataemailattachment.go b/typedapi/types/dataemailattachment.go index 7827744854..b81f3cd172 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // DataEmailAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L234-L236 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L234-L236 type DataEmailAttachment struct { Format *dataattachmentformat.DataAttachmentFormat `json:"format,omitempty"` } @@ -38,8 +38,6 @@ func NewDataEmailAttachment() *DataEmailAttachment { return r } -// true - type DataEmailAttachmentVariant interface { DataEmailAttachmentCaster() *DataEmailAttachment } diff --git a/typedapi/types/datafeedauthorization.go b/typedapi/types/datafeedauthorization.go index f7c0896486..280d936cad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DatafeedAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Authorization.ts#L31-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 01b58bfb16..ee694b8700 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DatafeedConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Datafeed.ts#L63-L120 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -240,8 +240,6 @@ func NewDatafeedConfig() *DatafeedConfig { return r } -// true - type DatafeedConfigVariant interface { DatafeedConfigCaster() *DatafeedConfig } diff --git a/typedapi/types/datafeedrunningstate.go b/typedapi/types/datafeedrunningstate.go index 8561eee364..7782286e27 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DatafeedRunningState type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Datafeed.ts#L210-L224 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4a986afae6..37d05c9a47 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Datafeeds type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/info/types.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4be651811e..61fadb5899 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DatafeedsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/ml_datafeeds/types.ts#L22-L87 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 95a38eaf71..cec150a282 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DatafeedStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Datafeed.ts#L143-L172 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 70b3afba10..b20515fe3b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DatafeedTimingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Datafeed.ts#L174-L202 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e51132f253..d885c24505 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DataframeAnalysisAnalyzedFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L238-L244 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -88,8 +88,6 @@ func NewDataframeAnalysisAnalyzedFields() *DataframeAnalysisAnalyzedFields { return r } -// true - type DataframeAnalysisAnalyzedFieldsVariant interface { DataframeAnalysisAnalyzedFieldsCaster() *DataframeAnalysisAnalyzedFields } diff --git a/typedapi/types/dataframeanalysisclassification.go b/typedapi/types/dataframeanalysisclassification.go index 4208d20bf9..fb3a76f901 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisClassification type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L227-L236 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -461,8 +461,6 @@ func NewDataframeAnalysisClassification() *DataframeAnalysisClassification { return r } -// true - type DataframeAnalysisClassificationVariant interface { DataframeAnalysisClassificationCaster() *DataframeAnalysisClassification } diff --git a/typedapi/types/dataframeanalysiscontainer.go b/typedapi/types/dataframeanalysiscontainer.go index 904a70a981..3541a1a748 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // DataframeAnalysisContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L84-L101 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L84-L101 type DataframeAnalysisContainer struct { AdditionalDataframeAnalysisContainerProperty map[string]json.RawMessage `json:"-"` // Classification The configuration information necessary to perform classification. @@ -84,8 +84,6 @@ func NewDataframeAnalysisContainer() *DataframeAnalysisContainer { return r } -// true - type DataframeAnalysisContainerVariant interface { DataframeAnalysisContainerCaster() *DataframeAnalysisContainer } diff --git a/typedapi/types/dataframeanalysisfeatureprocessor.go b/typedapi/types/dataframeanalysisfeatureprocessor.go index 1df67a35a2..e00d32531d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // DataframeAnalysisFeatureProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L246-L258 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -85,8 +85,6 @@ func NewDataframeAnalysisFeatureProcessor() *DataframeAnalysisFeatureProcessor { return r } -// true - type DataframeAnalysisFeatureProcessorVariant interface { DataframeAnalysisFeatureProcessorCaster() *DataframeAnalysisFeatureProcessor } diff --git a/typedapi/types/dataframeanalysisfeatureprocessorfrequencyencoding.go b/typedapi/types/dataframeanalysisfeatureprocessorfrequencyencoding.go index a83a50472b..8f028793e5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DataframeAnalysisFeatureProcessorFrequencyEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L260-L267 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L260-L267 type DataframeAnalysisFeatureProcessorFrequencyEncoding struct { // FeatureName The resulting feature name. FeatureName string `json:"feature_name"` @@ -87,8 +87,6 @@ func NewDataframeAnalysisFeatureProcessorFrequencyEncoding() *DataframeAnalysisF return r } -// true - type DataframeAnalysisFeatureProcessorFrequencyEncodingVariant interface { DataframeAnalysisFeatureProcessorFrequencyEncodingCaster() *DataframeAnalysisFeatureProcessorFrequencyEncoding } diff --git a/typedapi/types/dataframeanalysisfeatureprocessormultiencoding.go b/typedapi/types/dataframeanalysisfeatureprocessormultiencoding.go index ab17bcca22..d4f816e83a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // DataframeAnalysisFeatureProcessorMultiEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L269-L272 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -35,8 +35,6 @@ func NewDataframeAnalysisFeatureProcessorMultiEncoding() *DataframeAnalysisFeatu return r } -// true - type DataframeAnalysisFeatureProcessorMultiEncodingVariant interface { DataframeAnalysisFeatureProcessorMultiEncodingCaster() *DataframeAnalysisFeatureProcessorMultiEncoding } diff --git a/typedapi/types/dataframeanalysisfeatureprocessorngramencoding.go b/typedapi/types/dataframeanalysisfeatureprocessorngramencoding.go index c3f3fd2520..efce01ea6b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisFeatureProcessorNGramEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L274-L286 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L274-L286 type DataframeAnalysisFeatureProcessorNGramEncoding struct { Custom *bool `json:"custom,omitempty"` // FeaturePrefix The feature name prefix. Defaults to ngram__. @@ -144,8 +144,6 @@ func NewDataframeAnalysisFeatureProcessorNGramEncoding() *DataframeAnalysisFeatu return r } -// true - type DataframeAnalysisFeatureProcessorNGramEncodingVariant interface { DataframeAnalysisFeatureProcessorNGramEncodingCaster() *DataframeAnalysisFeatureProcessorNGramEncoding } diff --git a/typedapi/types/dataframeanalysisfeatureprocessoronehotencoding.go b/typedapi/types/dataframeanalysisfeatureprocessoronehotencoding.go index 5bdc1977f0..b93fc8f8d8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisFeatureProcessorOneHotEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L288-L293 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeAnalytics.ts#L288-L293 type DataframeAnalysisFeatureProcessorOneHotEncoding struct { // Field The name of the field to encode. Field string `json:"field"` @@ -83,8 +83,6 @@ func NewDataframeAnalysisFeatureProcessorOneHotEncoding() *DataframeAnalysisFeat return r } -// true - type DataframeAnalysisFeatureProcessorOneHotEncodingVariant interface { DataframeAnalysisFeatureProcessorOneHotEncodingCaster() *DataframeAnalysisFeatureProcessorOneHotEncoding } diff --git a/typedapi/types/dataframeanalysisfeatureprocessortargetmeanencoding.go b/typedapi/types/dataframeanalysisfeatureprocessortargetmeanencoding.go index 0b9407fe77..8ec95f2158 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisFeatureProcessorTargetMeanEncoding type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L295-L304 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -106,8 +106,6 @@ func NewDataframeAnalysisFeatureProcessorTargetMeanEncoding() *DataframeAnalysis return r } -// true - type DataframeAnalysisFeatureProcessorTargetMeanEncodingVariant interface { DataframeAnalysisFeatureProcessorTargetMeanEncodingCaster() *DataframeAnalysisFeatureProcessorTargetMeanEncoding } diff --git a/typedapi/types/dataframeanalysisoutlierdetection.go b/typedapi/types/dataframeanalysisoutlierdetection.go index 02cd0ef875..f5781b0f22 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisOutlierDetection type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L103-L132 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -174,8 +174,6 @@ func NewDataframeAnalysisOutlierDetection() *DataframeAnalysisOutlierDetection { return r } -// true - type DataframeAnalysisOutlierDetectionVariant interface { DataframeAnalysisOutlierDetectionCaster() *DataframeAnalysisOutlierDetection } diff --git a/typedapi/types/dataframeanalysisregression.go b/typedapi/types/dataframeanalysisregression.go index 46928dc78b..b4fe1ea5f4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalysisRegression type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L215-L225 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -458,8 +458,6 @@ func NewDataframeAnalysisRegression() *DataframeAnalysisRegression { return r } -// true - type DataframeAnalysisRegressionVariant interface { DataframeAnalysisRegressionCaster() *DataframeAnalysisRegression } diff --git a/typedapi/types/dataframeanalytics.go b/typedapi/types/dataframeanalytics.go index dad0d14879..8665a37bf6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DataframeAnalytics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L325-L345 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e302cb037d..58ec74315a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Authorization.ts#L45-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 da45a9ec67..0bef3db463 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DataframeAnalyticsDestination type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L77-L82 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -77,8 +77,6 @@ func NewDataframeAnalyticsDestination() *DataframeAnalyticsDestination { return r } -// true - type DataframeAnalyticsDestinationVariant interface { DataframeAnalyticsDestinationCaster() *DataframeAnalyticsDestination } diff --git a/typedapi/types/dataframeanalyticsfieldselection.go b/typedapi/types/dataframeanalyticsfieldselection.go index 9a98e81ae4..47fb05d8df 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsFieldSelection type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L55-L68 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 949a837f18..6a2bd4f966 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsMemoryEstimation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L70-L75 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 234efa708c..d744775e00 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataFrameAnalyticsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/ml_data_frame_analytics/types.ts#L22-L102 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5aa2810dee..10910dcb6c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DataframeAnalyticsSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L39-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -110,8 +110,6 @@ func NewDataframeAnalyticsSource() *DataframeAnalyticsSource { return r } -// true - type DataframeAnalyticsSourceVariant interface { DataframeAnalyticsSourceCaster() *DataframeAnalyticsSource } diff --git a/typedapi/types/dataframeanalyticsstatscontainer.go b/typedapi/types/dataframeanalyticsstatscontainer.go index af2c805db9..7573696f62 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // DataframeAnalyticsStatsContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L374-L382 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e60978e4c5..82f1183274 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsDataCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L365-L372 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 96e42a60e8..5e37d4a1c5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsHyperparameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L384-L403 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6cd18f16c4..86e78f7569 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsMemoryUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L354-L363 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 04a3cec30b..5e75dedd40 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DataframeAnalyticsStatsOutlierDetection type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L405-L418 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 15ff3864ef..1051e04986 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsStatsProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L347-L352 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b7dd8e23a4..56fbeb6216 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeAnalyticsSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L306-L323 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 56ff1a2096..590e051bb0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // DataframeClassificationSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L44-L66 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3dd740ebf7..bba5a1b461 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryAccuracy type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L111-L114 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 34a99b897a..88fc2362fa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryMulticlassConfusionMatrix type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L120-L123 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9a7dfc4b74..cba3cece4d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryPrecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L101-L104 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c90bc6ce39..6251846d64 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeClassificationSummaryRecall type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L106-L109 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e236c84642..f8c5be79f7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationClass type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L116-L118 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 949f4e11de..4e6340d23e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DataframeEvaluationClassification type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeEvaluation.ts#L35-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -94,8 +94,6 @@ func NewDataframeEvaluationClassification() *DataframeEvaluationClassification { return r } -// true - type DataframeEvaluationClassificationVariant interface { DataframeEvaluationClassificationCaster() *DataframeEvaluationClassification } diff --git a/typedapi/types/dataframeevaluationclassificationmetrics.go b/typedapi/types/dataframeevaluationclassificationmetrics.go index 6f5fb54f31..b6cc07f3a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationClassificationMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeEvaluation.ts#L73-L78 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -54,8 +54,6 @@ func NewDataframeEvaluationClassificationMetrics() *DataframeEvaluationClassific return r } -// true - type DataframeEvaluationClassificationMetricsVariant interface { DataframeEvaluationClassificationMetricsCaster() *DataframeEvaluationClassificationMetrics } diff --git a/typedapi/types/dataframeevaluationclassificationmetricsaucroc.go b/typedapi/types/dataframeevaluationclassificationmetricsaucroc.go index f9ed821c6e..2ffbc4108b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationClassificationMetricsAucRoc type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeEvaluation.ts#L85-L90 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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). @@ -89,8 +89,6 @@ func NewDataframeEvaluationClassificationMetricsAucRoc() *DataframeEvaluationCla return r } -// true - type DataframeEvaluationClassificationMetricsAucRocVariant interface { DataframeEvaluationClassificationMetricsAucRocCaster() *DataframeEvaluationClassificationMetricsAucRoc } diff --git a/typedapi/types/dataframeevaluationcontainer.go b/typedapi/types/dataframeevaluationcontainer.go index 41e0583d3b..6aff3a78a9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // DataframeEvaluationContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeEvaluation.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -80,8 +80,6 @@ func NewDataframeEvaluationContainer() *DataframeEvaluationContainer { return r } -// true - type DataframeEvaluationContainerVariant interface { DataframeEvaluationContainerCaster() *DataframeEvaluationContainer } diff --git a/typedapi/types/dataframeevaluationoutlierdetection.go b/typedapi/types/dataframeevaluationoutlierdetection.go index 5586e3fc08..8417cbdf68 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DataframeEvaluationOutlierDetection type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeEvaluation.ts#L46-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -86,8 +86,6 @@ func NewDataframeEvaluationOutlierDetection() *DataframeEvaluationOutlierDetecti return r } -// true - type DataframeEvaluationOutlierDetectionVariant interface { DataframeEvaluationOutlierDetectionCaster() *DataframeEvaluationOutlierDetection } diff --git a/typedapi/types/dataframeevaluationoutlierdetectionmetrics.go b/typedapi/types/dataframeevaluationoutlierdetectionmetrics.go index df32c52bb9..d6f24ad373 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationOutlierDetectionMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeEvaluation.ts#L80-L83 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -51,8 +51,6 @@ func NewDataframeEvaluationOutlierDetectionMetrics() *DataframeEvaluationOutlier return r } -// true - type DataframeEvaluationOutlierDetectionMetricsVariant interface { DataframeEvaluationOutlierDetectionMetricsCaster() *DataframeEvaluationOutlierDetectionMetrics } diff --git a/typedapi/types/dataframeevaluationregression.go b/typedapi/types/dataframeevaluationregression.go index 8cee7fc1be..fa48f50a1d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DataframeEvaluationRegression type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeEvaluation.ts#L55-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -86,8 +86,6 @@ func NewDataframeEvaluationRegression() *DataframeEvaluationRegression { return r } -// true - type DataframeEvaluationRegressionVariant interface { DataframeEvaluationRegressionCaster() *DataframeEvaluationRegression } diff --git a/typedapi/types/dataframeevaluationregressionmetrics.go b/typedapi/types/dataframeevaluationregressionmetrics.go index 131bb2b773..98674875fe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // DataframeEvaluationRegressionMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeEvaluation.ts#L92-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/DataframeEvaluation.ts#L92-L110 type DataframeEvaluationRegressionMetrics struct { // Huber Pseudo Huber loss function. Huber *DataframeEvaluationRegressionMetricsHuber `json:"huber,omitempty"` @@ -51,8 +51,6 @@ func NewDataframeEvaluationRegressionMetrics() *DataframeEvaluationRegressionMet return r } -// true - type DataframeEvaluationRegressionMetricsVariant interface { DataframeEvaluationRegressionMetricsCaster() *DataframeEvaluationRegressionMetrics } diff --git a/typedapi/types/dataframeevaluationregressionmetricshuber.go b/typedapi/types/dataframeevaluationregressionmetricshuber.go index c81e36d942..4f9ca803c0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationRegressionMetricsHuber type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeEvaluation.ts#L117-L120 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -82,8 +82,6 @@ func NewDataframeEvaluationRegressionMetricsHuber() *DataframeEvaluationRegressi return r } -// true - type DataframeEvaluationRegressionMetricsHuberVariant interface { DataframeEvaluationRegressionMetricsHuberCaster() *DataframeEvaluationRegressionMetricsHuber } diff --git a/typedapi/types/dataframeevaluationregressionmetricsmsle.go b/typedapi/types/dataframeevaluationregressionmetricsmsle.go index fc9983654d..07af8d1b1a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationRegressionMetricsMsle type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeEvaluation.ts#L112-L115 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -81,8 +81,6 @@ func NewDataframeEvaluationRegressionMetricsMsle() *DataframeEvaluationRegressio return r } -// true - type DataframeEvaluationRegressionMetricsMsleVariant interface { DataframeEvaluationRegressionMetricsMsleCaster() *DataframeEvaluationRegressionMetricsMsle } diff --git a/typedapi/types/dataframeevaluationsummaryaucroc.go b/typedapi/types/dataframeevaluationsummaryaucroc.go index 3670e907a5..3309816113 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationSummaryAucRoc type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L91-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ebd51f2c28..24cd2724f4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationSummaryAucRocCurveItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L95-L99 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dcdf9132fb..df0818bc18 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframeEvaluationValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L87-L89 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2ee1a5ca7e..f92de2958f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // DataframeOutlierDetectionSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L24-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eec23bfa83..30d69359eb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataframePreviewConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/preview_data_frame_analytics/types.ts#L27-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/preview_data_frame_analytics/types.ts#L27-L33 type DataframePreviewConfig struct { Analysis DataframeAnalysisContainer `json:"analysis"` AnalyzedFields *DataframeAnalysisAnalyzedFields `json:"analyzed_fields,omitempty"` @@ -110,8 +110,6 @@ func NewDataframePreviewConfig() *DataframePreviewConfig { return r } -// true - type DataframePreviewConfigVariant interface { DataframePreviewConfigCaster() *DataframePreviewConfig } diff --git a/typedapi/types/dataframeregressionsummary.go b/typedapi/types/dataframeregressionsummary.go index 6cfd70879e..3bffd8edc3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // DataframeRegressionSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/evaluate_data_frame/types.ts#L68-L85 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 be1f1f1c2a..23ce741c5b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataPathStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L586-L630 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 82147663da..22680ebfe3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // DataStream type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/DataStream.ts#L53-L139 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L54-L145 type DataStream struct { // AllowCustomRouting If `true`, the data stream allows custom routing on write request. AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"` @@ -85,6 +85,10 @@ type DataStream struct { // and the document will be indexed in the new backing index. If the rollover // fails the indexing request will fail too. RolloverOnWrite bool `json:"rollover_on_write"` + // Settings The settings specific to this data stream that will take precedence over the + // settings in the matching index + // template. + Settings IndexSettings `json:"settings"` // Status Health status of the data stream. // This health status is based on the state of the primary and replica shards of // the stream’s backing indices. @@ -240,6 +244,11 @@ func (s *DataStream) UnmarshalJSON(data []byte) error { s.RolloverOnWrite = v } + case "settings": + if err := dec.Decode(&s.Settings); err != nil { + return fmt.Errorf("%s | %w", "Settings", err) + } + case "status": if err := dec.Decode(&s.Status); err != nil { return fmt.Errorf("%s | %w", "Status", err) @@ -280,5 +289,3 @@ func NewDataStream() *DataStream { return r } - -// false diff --git a/typedapi/types/datastreamfailurestore.go b/typedapi/types/datastreamfailurestore.go new file mode 100644 index 0000000000..02f73f903e --- /dev/null +++ b/typedapi/types/datastreamfailurestore.go @@ -0,0 +1,99 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DataStreamFailureStore type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamFailureStore.ts#L22-L37 +type DataStreamFailureStore struct { + // Enabled If defined, it turns the failure store on/off (`true`/`false`) for this data + // stream. A data stream failure store + // that's disabled (enabled: `false`) will redirect no new failed indices to the + // failure store; however, it will + // not remove any existing data from the failure store. + Enabled *bool `json:"enabled,omitempty"` + // Lifecycle If defined, it specifies the lifecycle configuration for the failure store of + // this data stream. + Lifecycle *FailureStoreLifecycle `json:"lifecycle,omitempty"` +} + +func (s *DataStreamFailureStore) 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 "enabled": + 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", "Enabled", err) + } + s.Enabled = &value + case bool: + s.Enabled = &v + } + + case "lifecycle": + if err := dec.Decode(&s.Lifecycle); err != nil { + return fmt.Errorf("%s | %w", "Lifecycle", err) + } + + } + } + return nil +} + +// NewDataStreamFailureStore returns a DataStreamFailureStore. +func NewDataStreamFailureStore() *DataStreamFailureStore { + r := &DataStreamFailureStore{} + + return r +} + +type DataStreamFailureStoreVariant interface { + DataStreamFailureStoreCaster() *DataStreamFailureStore +} + +func (s *DataStreamFailureStore) DataStreamFailureStoreCaster() *DataStreamFailureStore { + return s +} diff --git a/typedapi/types/datastreamfailurestoretemplate.go b/typedapi/types/datastreamfailurestoretemplate.go new file mode 100644 index 0000000000..63ac6bd23f --- /dev/null +++ b/typedapi/types/datastreamfailurestoretemplate.go @@ -0,0 +1,89 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// DataStreamFailureStoreTemplate type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamFailureStore.ts#L39-L54 +type DataStreamFailureStoreTemplate struct { + // Enabled If defined, it turns the failure store on/off (`true`/`false`) for this data + // stream. A data stream failure store + // that's disabled (enabled: `false`) will redirect no new failed indices to the + // failure store; however, it will + // not remove any existing data from the failure store. + Enabled *bool `json:"enabled,omitempty"` + // Lifecycle If defined, it specifies the lifecycle configuration for the failure store of + // this data stream. + Lifecycle *FailureStoreLifecycleTemplate `json:"lifecycle,omitempty"` +} + +func (s *DataStreamFailureStoreTemplate) 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 "enabled": + if err := dec.Decode(&s.Enabled); err != nil { + return fmt.Errorf("%s | %w", "Enabled", err) + } + + case "lifecycle": + if err := dec.Decode(&s.Lifecycle); err != nil { + return fmt.Errorf("%s | %w", "Lifecycle", err) + } + + } + } + return nil +} + +// NewDataStreamFailureStoreTemplate returns a DataStreamFailureStoreTemplate. +func NewDataStreamFailureStoreTemplate() *DataStreamFailureStoreTemplate { + r := &DataStreamFailureStoreTemplate{} + + return r +} + +type DataStreamFailureStoreTemplateVariant interface { + DataStreamFailureStoreTemplateCaster() *DataStreamFailureStoreTemplate +} + +func (s *DataStreamFailureStoreTemplate) DataStreamFailureStoreTemplateCaster() *DataStreamFailureStoreTemplate { + return s +} diff --git a/typedapi/types/datastreamindex.go b/typedapi/types/datastreamindex.go index 710c91399b..9d58fe00e8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // DataStreamIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/DataStream.ts#L148-L173 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L154-L179 type DataStreamIndex struct { // IlmPolicy Name of the current ILM lifecycle policy configured for this backing index. IlmPolicy *string `json:"ilm_policy,omitempty"` @@ -116,5 +116,3 @@ func NewDataStreamIndex() *DataStreamIndex { return r } - -// false diff --git a/typedapi/types/datastreamlifecycle.go b/typedapi/types/datastreamlifecycle.go index 98ed4099f5..509cd434e1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/DataStreamLifecycle.ts#L25-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -98,8 +98,6 @@ func NewDataStreamLifecycle() *DataStreamLifecycle { return r } -// true - type DataStreamLifecycleVariant interface { DataStreamLifecycleCaster() *DataStreamLifecycle } diff --git a/typedapi/types/datastreamlifecycledetails.go b/typedapi/types/datastreamlifecycledetails.go index 1550ed8701..e706ad48c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L153-L157 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L154-L158 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 ce3ccabccf..158b2774c6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // DataStreamLifecycleDownsampling type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/DataStreamLifecycleDownsampling.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamLifecycleDownsampling.ts#L22-L27 type DataStreamLifecycleDownsampling struct { // Rounds The list of downsampling rounds to execute as part of this downsampling // configuration @@ -36,8 +36,6 @@ func NewDataStreamLifecycleDownsampling() *DataStreamLifecycleDownsampling { return r } -// true - type DataStreamLifecycleDownsamplingVariant interface { DataStreamLifecycleDownsamplingCaster() *DataStreamLifecycleDownsampling } diff --git a/typedapi/types/datastreamlifecycleexplain.go b/typedapi/types/datastreamlifecycleexplain.go index 3b70c2da80..e9a55bd0fa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleExplain type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/explain_data_lifecycle/IndicesExplainDataLifecycleResponse.ts#L31-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1cb348eaaa..11182d937b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DataStreamLifecycleIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L148-L152 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L149-L153 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 d83042c012..532505cd9f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleRolloverConditions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/DataStreamLifecycle.ts#L60-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamLifecycle.ts#L60-L72 type DataStreamLifecycleRolloverConditions struct { MaxAge *string `json:"max_age,omitempty"` MaxDocs *int64 `json:"max_docs,omitempty"` @@ -169,8 +169,6 @@ func NewDataStreamLifecycleRolloverConditions() *DataStreamLifecycleRolloverCond return r } -// true - type DataStreamLifecycleRolloverConditionsVariant interface { DataStreamLifecycleRolloverConditionsCaster() *DataStreamLifecycleRolloverConditions } diff --git a/typedapi/types/datastreamlifecyclewithrollover.go b/typedapi/types/datastreamlifecyclewithrollover.go index 43443e639e..1deab391d8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataStreamLifecycleWithRollover type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/DataStreamLifecycle.ts#L47-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -109,8 +109,6 @@ func NewDataStreamLifecycleWithRollover() *DataStreamLifecycleWithRollover { return r } -// true - type DataStreamLifecycleWithRolloverVariant interface { DataStreamLifecycleWithRolloverCaster() *DataStreamLifecycleWithRollover } diff --git a/typedapi/types/datastreamnames.go b/typedapi/types/datastreamnames.go index 8f305e5e5c..d9475bd05c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // DataStreamNames type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L88-L88 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L88-L88 type DataStreamNames []string diff --git a/typedapi/types/datastreamoptions.go b/typedapi/types/datastreamoptions.go new file mode 100644 index 0000000000..af45ac46c6 --- /dev/null +++ b/typedapi/types/datastreamoptions.go @@ -0,0 +1,37 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +// DataStreamOptions type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamOptions.ts#L25-L34 +type DataStreamOptions struct { + // FailureStore If defined, it specifies configuration for the failure store of this data + // stream. + FailureStore *DataStreamFailureStore `json:"failure_store,omitempty"` +} + +// NewDataStreamOptions returns a DataStreamOptions. +func NewDataStreamOptions() *DataStreamOptions { + r := &DataStreamOptions{} + + return r +} diff --git a/typedapi/types/datastreamoptionstemplate.go b/typedapi/types/datastreamoptionstemplate.go new file mode 100644 index 0000000000..c48763f9df --- /dev/null +++ b/typedapi/types/datastreamoptionstemplate.go @@ -0,0 +1,76 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// DataStreamOptionsTemplate type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamOptions.ts#L36-L41 +type DataStreamOptionsTemplate struct { + FailureStore *DataStreamFailureStoreTemplate `json:"failure_store,omitempty"` +} + +func (s *DataStreamOptionsTemplate) 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 "failure_store": + if err := dec.Decode(&s.FailureStore); err != nil { + return fmt.Errorf("%s | %w", "FailureStore", err) + } + + } + } + return nil +} + +// NewDataStreamOptionsTemplate returns a DataStreamOptionsTemplate. +func NewDataStreamOptionsTemplate() *DataStreamOptionsTemplate { + r := &DataStreamOptionsTemplate{} + + return r +} + +type DataStreamOptionsTemplateVariant interface { + DataStreamOptionsTemplateCaster() *DataStreamOptionsTemplate +} + +func (s *DataStreamOptionsTemplate) DataStreamOptionsTemplateCaster() *DataStreamOptionsTemplate { + return s +} diff --git a/typedapi/types/datastreams.go b/typedapi/types/datastreams.go index 1791407792..815c6d69fb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataStreams type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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/datastreamsettings.go b/typedapi/types/datastreamsettings.go new file mode 100644 index 0000000000..b8eaf950e3 --- /dev/null +++ b/typedapi/types/datastreamsettings.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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DataStreamSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_stream_settings/IndicesGetDataStreamSettingsResponse.ts#L29-L39 +type DataStreamSettings struct { + // EffectiveSettings The settings specific to this data stream merged with the settings from its + // template. These `effective_settings` + // are the settings that will be used when a new index is created for this data + // stream. + EffectiveSettings IndexSettings `json:"effective_settings"` + // Name The name of the data stream. + Name string `json:"name"` + // Settings The settings specific to this data stream + Settings IndexSettings `json:"settings"` +} + +func (s *DataStreamSettings) 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 "effective_settings": + if err := dec.Decode(&s.EffectiveSettings); err != nil { + return fmt.Errorf("%s | %w", "EffectiveSettings", err) + } + + 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 "settings": + if err := dec.Decode(&s.Settings); err != nil { + return fmt.Errorf("%s | %w", "Settings", err) + } + + } + } + return nil +} + +// NewDataStreamSettings returns a DataStreamSettings. +func NewDataStreamSettings() *DataStreamSettings { + r := &DataStreamSettings{} + + return r +} diff --git a/typedapi/types/nodeinfonetworkinterface.go b/typedapi/types/datastreamsettingserror.go similarity index 54% rename from typedapi/types/nodeinfonetworkinterface.go rename to typedapi/types/datastreamsettingserror.go index aaa2bfd32b..e6d58893a1 100644 --- a/typedapi/types/nodeinfonetworkinterface.go +++ b/typedapi/types/datastreamsettingserror.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,16 +29,17 @@ import ( "strconv" ) -// NodeInfoNetworkInterface type. +// DataStreamSettingsError type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/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/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L71-L77 +type DataStreamSettingsError struct { + // Error A message explaining why the settings could not be applied to specific + // indices. + Error string `json:"error"` + Index string `json:"index"` } -func (s *NodeInfoNetworkInterface) UnmarshalJSON(data []byte) error { +func (s *DataStreamSettingsError) UnmarshalJSON(data []byte) error { dec := json.NewDecoder(bytes.NewReader(data)) @@ -53,33 +54,21 @@ func (s *NodeInfoNetworkInterface) UnmarshalJSON(data []byte) error { switch t { - case "address": + case "error": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "Address", err) + return fmt.Errorf("%s | %w", "Error", err) } o := string(tmp[:]) o, err = strconv.Unquote(o) if err != nil { o = string(tmp[:]) } - s.Address = o + s.Error = o - case "mac_address": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "MacAddress", 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) + case "index": + if err := dec.Decode(&s.Index); err != nil { + return fmt.Errorf("%s | %w", "Index", err) } } @@ -87,11 +76,9 @@ func (s *NodeInfoNetworkInterface) UnmarshalJSON(data []byte) error { return nil } -// NewNodeInfoNetworkInterface returns a NodeInfoNetworkInterface. -func NewNodeInfoNetworkInterface() *NodeInfoNetworkInterface { - r := &NodeInfoNetworkInterface{} +// NewDataStreamSettingsError returns a DataStreamSettingsError. +func NewDataStreamSettingsError() *DataStreamSettingsError { + r := &DataStreamSettingsError{} return r } - -// false diff --git a/typedapi/types/datastreamsstatsitem.go b/typedapi/types/datastreamsstatsitem.go index 4da63e4e2f..eab9d90771 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataStreamsStatsItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/data_streams_stats/IndicesDataStreamsStatsResponse.ts#L45-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f956e6d376..d4301f1f97 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataStreamStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_data_lifecycle_stats/IndicesGetDataLifecycleStatsResponse.ts#L46-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d5f53af7c0..ba734fde5e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataStreamTimestamp type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/TypeMapping.ts#L59-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/TypeMapping.ts#L59-L61 type DataStreamTimestamp struct { Enabled bool `json:"enabled"` } @@ -77,8 +77,6 @@ func NewDataStreamTimestamp() *DataStreamTimestamp { return r } -// true - type DataStreamTimestampVariant interface { DataStreamTimestampCaster() *DataStreamTimestamp } diff --git a/typedapi/types/datastreamtimestampfield.go b/typedapi/types/datastreamtimestampfield.go index 02eb3156ad..d361209076 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DataStreamTimestampField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/DataStream.ts#L141-L146 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L147-L152 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 7434bf06fb..aa3fb5ada5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataStreamVisibility type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/DataStream.ts#L175-L178 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L181-L184 type DataStreamVisibility struct { AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"` Hidden *bool `json:"hidden,omitempty"` @@ -92,8 +92,6 @@ func NewDataStreamVisibility() *DataStreamVisibility { return r } -// true - type DataStreamVisibilityVariant interface { DataStreamVisibilityCaster() *DataStreamVisibility } diff --git a/typedapi/types/datastreamwithlifecycle.go b/typedapi/types/datastreamwithlifecycle.go index 3e91a1414c..16e9d02f0d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DataStreamWithLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_data_lifecycle/IndicesGetDataLifecycleResponse.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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/datastreamwithoptions.go b/typedapi/types/datastreamwithoptions.go new file mode 100644 index 0000000000..a84ea6d0ce --- /dev/null +++ b/typedapi/types/datastreamwithoptions.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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// DataStreamWithOptions type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get_data_stream_options/IndicesGetDataStreamOptionsResponse.ts#L27-L30 +type DataStreamWithOptions struct { + Name string `json:"name"` + Options *DataStreamOptions `json:"options,omitempty"` +} + +func (s *DataStreamWithOptions) 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 "name": + if err := dec.Decode(&s.Name); err != nil { + return fmt.Errorf("%s | %w", "Name", err) + } + + case "options": + if err := dec.Decode(&s.Options); err != nil { + return fmt.Errorf("%s | %w", "Options", err) + } + + } + } + return nil +} + +// NewDataStreamWithOptions returns a DataStreamWithOptions. +func NewDataStreamWithOptions() *DataStreamWithOptions { + r := &DataStreamWithOptions{} + + return r +} diff --git a/typedapi/types/datatierphasestatistics.go b/typedapi/types/datatierphasestatistics.go index 4dc5e630be..cd62b1def0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataTierPhaseStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L83-L94 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 68bec10286..f4dad3eef5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DataTiers type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L349-L359 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 975051bf54..0d26b98c7e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,7 +29,7 @@ import ( // DateDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L209-L209 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -75,8 +75,6 @@ func NewDateDecayFunction() *DateDecayFunction { return r } -// true - type DateDecayFunctionVariant interface { DateDecayFunctionCaster() *DateDecayFunction } @@ -84,3 +82,8 @@ type DateDecayFunctionVariant interface { func (s *DateDecayFunction) DateDecayFunctionCaster() *DateDecayFunction { return s } + +func (s *DateDecayFunction) DecayFunctionCaster() *DecayFunction { + o := DecayFunction(s) + return &o +} diff --git a/typedapi/types/datedistancefeaturequery.go b/typedapi/types/datedistancefeaturequery.go index c9652f4d24..082270e65a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DateDistanceFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L71-L74 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -132,8 +132,6 @@ func NewDateDistanceFeatureQuery() *DateDistanceFeatureQuery { return r } -// true - type DateDistanceFeatureQueryVariant interface { DateDistanceFeatureQueryCaster() *DateDistanceFeatureQuery } @@ -141,3 +139,8 @@ type DateDistanceFeatureQueryVariant interface { func (s *DateDistanceFeatureQuery) DateDistanceFeatureQueryCaster() *DateDistanceFeatureQuery { return s } + +func (s *DateDistanceFeatureQuery) DistanceFeatureQueryCaster() *DistanceFeatureQuery { + o := DistanceFeatureQuery(s) + return &o +} diff --git a/typedapi/types/datehistogramaggregate.go b/typedapi/types/datehistogramaggregate.go index b1b8dced4b..03128e208c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DateHistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L383-L386 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b910ae85c9..052435a4f0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // DateHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L202-L260 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -226,8 +226,6 @@ func NewDateHistogramAggregation() *DateHistogramAggregation { return r } -// true - type DateHistogramAggregationVariant interface { DateHistogramAggregationCaster() *DateHistogramAggregation } diff --git a/typedapi/types/datehistogrambucket.go b/typedapi/types/datehistogrambucket.go index 7a1012b944..4579bcefa8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // DateHistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L388-L391 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a8cf2a028d..70528e4dc7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DateHistogramGrouping type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/_types/Groupings.ts#L42-L73 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -125,8 +125,6 @@ func NewDateHistogramGrouping() *DateHistogramGrouping { return r } -// true - type DateHistogramGroupingVariant interface { DateHistogramGroupingCaster() *DateHistogramGrouping } diff --git a/typedapi/types/dateindexnameprocessor.go b/typedapi/types/dateindexnameprocessor.go index 563cf9f051..915ad50d5d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DateIndexNameProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L730-L768 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L730-L768 type DateIndexNameProcessor struct { // DateFormats An array of the expected date formats for parsing dates / timestamps in the // document being preprocessed. @@ -218,8 +218,6 @@ func NewDateIndexNameProcessor() *DateIndexNameProcessor { return r } -// true - type DateIndexNameProcessorVariant interface { DateIndexNameProcessorCaster() *DateIndexNameProcessor } diff --git a/typedapi/types/datenanosproperty.go b/typedapi/types/datenanosproperty.go index 536e2b6151..d1df55a8b5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // DateNanosProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L90-L100 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L91-L101 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 { @@ -950,8 +962,6 @@ func NewDateNanosProperty() *DateNanosProperty { return r } -// true - type DateNanosPropertyVariant interface { DateNanosPropertyCaster() *DateNanosProperty } @@ -959,3 +969,8 @@ type DateNanosPropertyVariant interface { func (s *DateNanosProperty) DateNanosPropertyCaster() *DateNanosProperty { return s } + +func (s *DateNanosProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/dateprocessor.go b/typedapi/types/dateprocessor.go index 4647876ac3..c95c81bb5b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DateProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L770-L803 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L770-L803 type DateProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -191,8 +191,6 @@ func NewDateProcessor() *DateProcessor { return r } -// true - type DateProcessorVariant interface { DateProcessorCaster() *DateProcessor } diff --git a/typedapi/types/dateproperty.go b/typedapi/types/dateproperty.go index 9abe4aef4e..8864c0b709 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // DateProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L76-L88 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L77-L89 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 { @@ -971,8 +983,6 @@ func NewDateProperty() *DateProperty { return r } -// true - type DatePropertyVariant interface { DatePropertyCaster() *DateProperty } @@ -980,3 +990,8 @@ type DatePropertyVariant interface { func (s *DateProperty) DatePropertyCaster() *DateProperty { return s } + +func (s *DateProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/daterangeaggregate.go b/typedapi/types/daterangeaggregate.go index 884c1addf5..ed67fc310e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DateRangeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L609-L615 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e9a8345955..5562e980a1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DateRangeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L281-L307 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -122,8 +122,6 @@ func NewDateRangeAggregation() *DateRangeAggregation { return r } -// true - type DateRangeAggregationVariant interface { DateRangeAggregationCaster() *DateRangeAggregation } diff --git a/typedapi/types/daterangeexpression.go b/typedapi/types/daterangeexpression.go index 9fe768272c..73b44605bf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DateRangeExpression type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L318-L331 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L318-L331 type DateRangeExpression struct { // From Start of the range (inclusive). From FieldDateMath `json:"from,omitempty"` @@ -90,8 +90,6 @@ func NewDateRangeExpression() *DateRangeExpression { return r } -// true - type DateRangeExpressionVariant interface { DateRangeExpressionCaster() *DateRangeExpression } diff --git a/typedapi/types/daterangeproperty.go b/typedapi/types/daterangeproperty.go index 3365bf4f87..ec01ca0414 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // DateRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/range.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -910,8 +922,6 @@ func NewDateRangeProperty() *DateRangeProperty { return r } -// true - type DateRangePropertyVariant interface { DateRangePropertyCaster() *DateRangeProperty } @@ -919,3 +929,8 @@ type DateRangePropertyVariant interface { func (s *DateRangeProperty) DateRangePropertyCaster() *DateRangeProperty { return s } + +func (s *DateRangeProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/daterangequery.go b/typedapi/types/daterangequery.go index f6d54e8861..90a4dcc763 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DateRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L161-L170 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L157-L166 type DateRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -43,7 +43,6 @@ type DateRangeQuery struct { Boost *float32 `json:"boost,omitempty"` // Format Date format used to convert `date` values in the query. Format *string `json:"format,omitempty"` - From *string `json:"from,omitempty"` // Gt Greater than. Gt *string `json:"gt,omitempty"` // Gte Greater than or equal to. @@ -58,7 +57,6 @@ type DateRangeQuery struct { // TimeZone Coordinated Universal Time (UTC) offset or IANA time zone used to convert // `date` values in the query to UTC. TimeZone *string `json:"time_zone,omitempty"` - To *string `json:"to,omitempty"` } func (s *DateRangeQuery) UnmarshalJSON(data []byte) error { @@ -97,11 +95,6 @@ func (s *DateRangeQuery) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Format", err) } - case "from": - if err := dec.Decode(&s.From); err != nil { - return fmt.Errorf("%s | %w", "From", err) - } - case "gt": if err := dec.Decode(&s.Gt); err != nil { return fmt.Errorf("%s | %w", "Gt", err) @@ -144,11 +137,6 @@ func (s *DateRangeQuery) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "TimeZone", err) } - case "to": - if err := dec.Decode(&s.To); err != nil { - return fmt.Errorf("%s | %w", "To", err) - } - } } return nil @@ -161,8 +149,6 @@ func NewDateRangeQuery() *DateRangeQuery { return r } -// true - type DateRangeQueryVariant interface { DateRangeQueryCaster() *DateRangeQuery } @@ -170,3 +156,8 @@ type DateRangeQueryVariant interface { func (s *DateRangeQuery) DateRangeQueryCaster() *DateRangeQuery { return s } + +func (s *DateRangeQuery) RangeQueryCaster() *RangeQuery { + o := RangeQuery(s) + return &o +} diff --git a/typedapi/types/datetime.go b/typedapi/types/datetime.go index 89f02b1dc8..5efd4b3d41 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // int64 // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Time.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L22-L27 type DateTime any type DateTimeVariant interface { diff --git a/typedapi/types/decayfunction.go b/typedapi/types/decayfunction.go index 4b89939c2a..f24b42f0d2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ package types // NumericDecayFunction // GeoDecayFunction // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L215-L224 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L215-L224 type DecayFunction any type DecayFunctionVariant interface { diff --git a/typedapi/types/decayplacement.go b/typedapi/types/decayplacement.go index 4457a1e915..7cf9a9f8fa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DecayPlacement type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L170-L189 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -104,8 +104,6 @@ func NewDecayPlacement() *DecayPlacement { return r } -// true - type DecayPlacementVariant interface { DecayPlacementCaster() *DecayPlacement } diff --git a/typedapi/types/decayplacementdatemathduration.go b/typedapi/types/decayplacementdatemathduration.go index af2eb0fc56..79f54d1aa6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DecayPlacementDateMathDuration type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L170-L189 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -104,8 +104,6 @@ func NewDecayPlacementDateMathDuration() *DecayPlacementDateMathDuration { return r } -// true - type DecayPlacementDateMathDurationVariant interface { DecayPlacementDateMathDurationCaster() *DecayPlacementDateMathDuration } diff --git a/typedapi/types/decayplacementdoubledouble.go b/typedapi/types/decayplacementdoubledouble.go index 1b89a2aae9..8e89f22006 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DecayPlacementdoubledouble type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L170-L189 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -137,8 +137,6 @@ func NewDecayPlacementdoubledouble() *DecayPlacementdoubledouble { return r } -// true - type DecayPlacementdoubledoubleVariant interface { DecayPlacementdoubledoubleCaster() *DecayPlacementdoubledouble } diff --git a/typedapi/types/decayplacementgeolocationdistance.go b/typedapi/types/decayplacementgeolocationdistance.go index b00f82191f..39ac3178f3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DecayPlacementGeoLocationDistance type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L170-L189 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -144,8 +144,6 @@ func NewDecayPlacementGeoLocationDistance() *DecayPlacementGeoLocationDistance { return r } -// true - type DecayPlacementGeoLocationDistanceVariant interface { DecayPlacementGeoLocationDistanceCaster() *DecayPlacementGeoLocationDistance } diff --git a/typedapi/types/decimaldigittokenfilter.go b/typedapi/types/decimaldigittokenfilter.go new file mode 100644 index 0000000000..f2dc3840e1 --- /dev/null +++ b/typedapi/types/decimaldigittokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// DecimalDigitTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type DecimalDigitTokenFilterVariant interface { + DecimalDigitTokenFilterCaster() *DecimalDigitTokenFilter +} + +func (s *DecimalDigitTokenFilter) DecimalDigitTokenFilterCaster() *DecimalDigitTokenFilter { + return s +} + +func (s *DecimalDigitTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/deepseekservicesettings.go b/typedapi/types/deepseekservicesettings.go new file mode 100644 index 0000000000..b0724b8caa --- /dev/null +++ b/typedapi/types/deepseekservicesettings.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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DeepSeekServiceSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type DeepSeekServiceSettingsVariant interface { + DeepSeekServiceSettingsCaster() *DeepSeekServiceSettings +} + +func (s *DeepSeekServiceSettings) DeepSeekServiceSettingsCaster() *DeepSeekServiceSettings { + return s +} diff --git a/typedapi/types/defaults.go b/typedapi/types/defaults.go index 36f4c9f970..b416948263 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Defaults type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/info/types.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b9b1b25bfe..a8d8b5d751 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Definition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/types.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L24-L29 type Definition struct { // Preprocessors Collection of preprocessors Preprocessors []Preprocessor `json:"preprocessors,omitempty"` @@ -37,8 +37,6 @@ func NewDefinition() *Definition { return r } -// true - type DefinitionVariant interface { DefinitionCaster() *Definition } diff --git a/typedapi/types/delayeddatacheckconfig.go b/typedapi/types/delayeddatacheckconfig.go index 7b306b98c2..99af0e5b59 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DelayedDataCheckConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Datafeed.ts#L122-L133 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -90,8 +90,6 @@ func NewDelayedDataCheckConfig() *DelayedDataCheckConfig { return r } -// true - type DelayedDataCheckConfigVariant interface { DelayedDataCheckConfigCaster() *DelayedDataCheckConfig } diff --git a/typedapi/types/deleteaction.go b/typedapi/types/deleteaction.go index ccde7edc29..1c47353429 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DeleteAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L149-L151 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L149-L151 type DeleteAction struct { DeleteSearchableSnapshot *bool `json:"delete_searchable_snapshot,omitempty"` } @@ -77,8 +77,6 @@ func NewDeleteAction() *DeleteAction { return r } -// true - type DeleteActionVariant interface { DeleteActionCaster() *DeleteAction } diff --git a/typedapi/types/deleteoperation.go b/typedapi/types/deleteoperation.go index 910cefe2de..1a9eec12f2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DeleteOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/bulk/types.ts#L144-L144 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/types.ts#L144-L144 type DeleteOperation struct { // Id_ The document ID. Id_ *string `json:"_id,omitempty"` @@ -119,8 +119,6 @@ func NewDeleteOperation() *DeleteOperation { return r } -// true - type DeleteOperationVariant interface { DeleteOperationCaster() *DeleteOperation } diff --git a/typedapi/types/delimitedpayloadtokenfilter.go b/typedapi/types/delimitedpayloadtokenfilter.go index eb7f7339a8..90effd7227 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,12 +33,14 @@ import ( // DelimitedPayloadTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L67-L71 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -110,8 +112,6 @@ func NewDelimitedPayloadTokenFilter() *DelimitedPayloadTokenFilter { return r } -// true - type DelimitedPayloadTokenFilterVariant interface { DelimitedPayloadTokenFilterCaster() *DelimitedPayloadTokenFilter } @@ -119,3 +119,8 @@ type DelimitedPayloadTokenFilterVariant interface { func (s *DelimitedPayloadTokenFilter) DelimitedPayloadTokenFilterCaster() *DelimitedPayloadTokenFilter { return s } + +func (s *DelimitedPayloadTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/densevectorindexoptions.go b/typedapi/types/densevectorindexoptions.go index bf27e1dacd..fa08c6616d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DenseVectorIndexOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/DenseVectorProperty.ts#L129-L166 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/DenseVectorProperty.ts#L129-L166 type DenseVectorIndexOptions struct { // ConfidenceInterval The confidence interval to use when quantizing the vectors. Can be any value // between and including `0.90` and @@ -157,8 +157,6 @@ func NewDenseVectorIndexOptions() *DenseVectorIndexOptions { return r } -// true - type DenseVectorIndexOptionsVariant interface { DenseVectorIndexOptionsCaster() *DenseVectorIndexOptions } diff --git a/typedapi/types/densevectorindexoptionsrescorevector.go b/typedapi/types/densevectorindexoptionsrescorevector.go index 74ceda520b..534c63fde4 100644 --- a/typedapi/types/densevectorindexoptionsrescorevector.go +++ b/typedapi/types/densevectorindexoptionsrescorevector.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DenseVectorIndexOptionsRescoreVector type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/DenseVectorProperty.ts#L215-L223 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/DenseVectorProperty.ts#L215-L223 type DenseVectorIndexOptionsRescoreVector struct { // Oversample The oversampling factor to use when searching for the nearest neighbor. This // is only applicable to the quantized formats: `bbq_*`, `int4_*`, and `int8_*`. @@ -86,8 +86,6 @@ func NewDenseVectorIndexOptionsRescoreVector() *DenseVectorIndexOptionsRescoreVe return r } -// true - type DenseVectorIndexOptionsRescoreVectorVariant interface { DenseVectorIndexOptionsRescoreVectorCaster() *DenseVectorIndexOptionsRescoreVector } diff --git a/typedapi/types/densevectoroffheapstats.go b/typedapi/types/densevectoroffheapstats.go new file mode 100644 index 0000000000..e0d33afa61 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// DenseVectorOffHeapStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2104d09322..9e2cf9a7e7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // DenseVectorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/DenseVectorProperty.ts#L23-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -880,8 +892,6 @@ func NewDenseVectorProperty() *DenseVectorProperty { return r } -// true - type DenseVectorPropertyVariant interface { DenseVectorPropertyCaster() *DenseVectorProperty } @@ -889,3 +899,8 @@ type DenseVectorPropertyVariant interface { func (s *DenseVectorProperty) DenseVectorPropertyCaster() *DenseVectorProperty { return s } + +func (s *DenseVectorProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} 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 532e98c280..df5dbdd389 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,16 +29,15 @@ import ( "strconv" ) -// ClusterPressureMemory type. +// DenseVectorStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/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/907d11a72a6bfd37b777d526880c56202889609e/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 7a9c065bb8..73cb171c0d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Dependency type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L30-L33 type Dependency struct { Field string `json:"field"` Value ScalarValue `json:"value"` @@ -81,8 +81,6 @@ func NewDependency() *Dependency { return r } -// true - type DependencyVariant interface { DependencyCaster() *Dependency } diff --git a/typedapi/types/deprecation.go b/typedapi/types/deprecation.go index a1daa34417..acacb02b0a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // Deprecation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/migration/deprecations/types.ts#L32-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5024999b80..7a76f6a455 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DeprecationIndexing type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L144-L146 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a9f0c43e57..8c8f8a3b9a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DerivativeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L241-L248 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 caccd9040a..5677794a9f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DerivativeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L216-L216 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -94,8 +94,6 @@ func NewDerivativeAggregation() *DerivativeAggregation { return r } -// true - type DerivativeAggregationVariant interface { DerivativeAggregationCaster() *DerivativeAggregation } diff --git a/typedapi/types/detailsinfo.go b/typedapi/types/detailsinfo.go index 44526a8fb5..c144765bd1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DetailsInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L286-L321 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 96ed067ffe..f0af8f23d3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // DetectionRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Rule.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -51,8 +51,6 @@ func NewDetectionRule() *DetectionRule { return r } -// true - type DetectionRuleVariant interface { DetectionRuleCaster() *DetectionRule } diff --git a/typedapi/types/detector.go b/typedapi/types/detector.go index 154587fc09..1e47b0bdab 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // Detector type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Detector.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -184,8 +184,6 @@ func NewDetector() *Detector { return r } -// true - type DetectorVariant interface { DetectorCaster() *Detector } diff --git a/typedapi/types/detectorread.go b/typedapi/types/detectorread.go index 6c2313e7e2..0dfa65755b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DetectorRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Detector.ts#L69-L125 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dfc8dda9e9..3c323206e6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DetectorUpdate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Detector.ts#L127-L143 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -107,8 +107,6 @@ func NewDetectorUpdate() *DetectorUpdate { return r } -// true - type DetectorUpdateVariant interface { DetectorUpdateCaster() *DetectorUpdate } diff --git a/typedapi/types/dfsknnprofile.go b/typedapi/types/dfsknnprofile.go index d919a9c68e..a2cc548136 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DfsKnnProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L181-L186 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b9d117c448..170bc0ccb7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // DfsProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L154-L157 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 50183144b2..cd0bc1f299 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DfsStatisticsBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L170-L179 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c0e147622c..4e4b30a90a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DfsStatisticsProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L159-L167 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 313bd7ec8e..35ed78f399 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Diagnosis type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L51-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L52-L58 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 3362c1bc3d..aa28c340f0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DiagnosisAffectedResources type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L59-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L60-L66 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 c6e4db4d88..153f2d96f1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,17 +31,32 @@ import ( // DictionaryDecompounderTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L53-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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" @@ -192,8 +194,6 @@ func NewDictionaryDecompounderTokenFilter() *DictionaryDecompounderTokenFilter { return r } -// true - type DictionaryDecompounderTokenFilterVariant interface { DictionaryDecompounderTokenFilterCaster() *DictionaryDecompounderTokenFilter } @@ -201,3 +201,8 @@ type DictionaryDecompounderTokenFilterVariant interface { func (s *DictionaryDecompounderTokenFilter) DictionaryDecompounderTokenFilterCaster() *DictionaryDecompounderTokenFilter { return s } + +func (s *DictionaryDecompounderTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/directgenerator.go b/typedapi/types/directgenerator.go index 7a6b47ab64..3eb245d4fc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DirectGenerator type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L269-L332 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L269-L332 type DirectGenerator struct { // Field The field to fetch the candidate suggestions from. // Needs to be set globally or per suggestion. @@ -253,8 +253,6 @@ func NewDirectGenerator() *DirectGenerator { return r } -// true - type DirectGeneratorVariant interface { DirectGeneratorCaster() *DirectGenerator } diff --git a/typedapi/types/discovery.go b/typedapi/types/discovery.go index ea1c72c04c..18df3c229f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Discovery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L201-L219 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 80d035efdb..749f47b9fd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // DiscoveryNode type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DiscoveryNode.ts#L25-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 40d294e99f..d2c79241b0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DiscoveryNodeCompact type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DiscoveryNode.ts#L39-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4828c53040..b1277c0ea3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DiscoveryNodeContent type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DiscoveryNode.ts#L27-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f9a68956b6..5ee18df410 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DiskIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L124-L128 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L125-L129 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 fb1f654ff7..3ff0b40906 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DiskIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L129-L135 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L130-L136 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 470647a915..877e5ff301 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DiskUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/types.ts#L63-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 49f7e97510..4af8f31cf9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DisMaxQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L88-L103 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -126,8 +126,6 @@ func NewDisMaxQuery() *DisMaxQuery { return r } -// true - type DisMaxQueryVariant interface { DisMaxQueryCaster() *DisMaxQuery } diff --git a/typedapi/types/dissectprocessor.go b/typedapi/types/dissectprocessor.go index f581aac573..2ae6b89935 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DissectProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L805-L824 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L805-L824 type DissectProcessor struct { // AppendSeparator The character(s) that separate the appended fields. AppendSeparator *string `json:"append_separator,omitempty"` @@ -174,8 +174,6 @@ func NewDissectProcessor() *DissectProcessor { return r } -// true - type DissectProcessorVariant interface { DissectProcessorCaster() *DissectProcessor } diff --git a/typedapi/types/distancefeaturequery.go b/typedapi/types/distancefeaturequery.go index 50d9ae46a6..7b1a18ed5c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ package types // GeoDistanceFeatureQuery // DateDistanceFeatureQuery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L76-L85 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L76-L85 type DistanceFeatureQuery any type DistanceFeatureQueryVariant interface { diff --git a/typedapi/types/diversifiedsampleraggregation.go b/typedapi/types/diversifiedsampleraggregation.go index 92f7e9b4bc..14db04c39b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DiversifiedSamplerAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L333-L357 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -121,8 +121,6 @@ func NewDiversifiedSamplerAggregation() *DiversifiedSamplerAggregation { return r } -// true - type DiversifiedSamplerAggregationVariant interface { DiversifiedSamplerAggregationCaster() *DiversifiedSamplerAggregation } diff --git a/typedapi/types/docstats.go b/typedapi/types/docstats.go index b61308089d..6463ec5e35 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DocStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L100-L112 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 536efff610..7291180c9b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Document type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Simulation.ts#L62-L76 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Simulation.ts#L69-L83 type Document struct { // Id_ Unique identifier for the document. // This ID must be unique within the `_index`. @@ -83,8 +83,6 @@ func NewDocument() *Document { return r } -// true - type DocumentVariant interface { DocumentCaster() *Document } diff --git a/typedapi/types/documentrating.go b/typedapi/types/documentrating.go index 11a31358ca..f78e8e686c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DocumentRating type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L119-L126 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L119-L126 type DocumentRating struct { // Id_ The document ID. Id_ string `json:"_id"` @@ -95,8 +95,6 @@ func NewDocumentRating() *DocumentRating { return r } -// true - type DocumentRatingVariant interface { DocumentRatingCaster() *DocumentRating } diff --git a/typedapi/types/documentsimulation.go b/typedapi/types/documentsimulation.go index 7d17590d0e..b8e27228e2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // DocumentSimulation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Simulation.ts#L78-L108 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7d51c09254..d47e655ab1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DotExpanderProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L826-L844 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L826-L844 type DotExpanderProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -167,8 +167,6 @@ func NewDotExpanderProcessor() *DotExpanderProcessor { return r } -// true - type DotExpanderProcessorVariant interface { DotExpanderProcessorCaster() *DotExpanderProcessor } diff --git a/typedapi/types/doublenumberproperty.go b/typedapi/types/doublenumberproperty.go index ffa2d51e3b..463be2e484 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // DoubleNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L166-L169 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L167-L170 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 { @@ -973,8 +985,6 @@ func NewDoubleNumberProperty() *DoubleNumberProperty { return r } -// true - type DoubleNumberPropertyVariant interface { DoubleNumberPropertyCaster() *DoubleNumberProperty } @@ -982,3 +992,8 @@ type DoubleNumberPropertyVariant interface { func (s *DoubleNumberProperty) DoubleNumberPropertyCaster() *DoubleNumberProperty { return s } + +func (s *DoubleNumberProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/doublerangeproperty.go b/typedapi/types/doublerangeproperty.go index a9ab510c3d..7404baa4bf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // DoubleRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/range.ts#L34-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -896,8 +908,6 @@ func NewDoubleRangeProperty() *DoubleRangeProperty { return r } -// true - type DoubleRangePropertyVariant interface { DoubleRangePropertyCaster() *DoubleRangeProperty } @@ -905,3 +915,8 @@ type DoubleRangePropertyVariant interface { func (s *DoubleRangeProperty) DoubleRangePropertyCaster() *DoubleRangeProperty { return s } + +func (s *DoubleRangeProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/doubletermsaggregate.go b/typedapi/types/doubletermsaggregate.go index 710e8a0a55..fa6d5715c1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DoubleTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L451-L456 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 83fd69ba10..9f231d5123 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // DoubleTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L458-L461 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 edb4db1922..5f653c3a82 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DownsampleAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L112-L115 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L112-L115 type DownsampleAction struct { FixedInterval string `json:"fixed_interval"` WaitTimeout Duration `json:"wait_timeout,omitempty"` @@ -73,8 +73,6 @@ func NewDownsampleAction() *DownsampleAction { return r } -// true - type DownsampleActionVariant interface { DownsampleActionCaster() *DownsampleAction } diff --git a/typedapi/types/downsampleconfig.go b/typedapi/types/downsampleconfig.go index 7005d5cae9..12148a01ec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DownsampleConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/Downsample.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -68,8 +68,6 @@ func NewDownsampleConfig() *DownsampleConfig { return r } -// true - type DownsampleConfigVariant interface { DownsampleConfigCaster() *DownsampleConfig } diff --git a/typedapi/types/downsamplinground.go b/typedapi/types/downsamplinground.go index 51d1c3cbc7..562fffb859 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // DownsamplingRound type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/DownsamplingRound.ts#L23-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -75,8 +75,6 @@ func NewDownsamplingRound() *DownsamplingRound { return r } -// true - type DownsamplingRoundVariant interface { DownsamplingRoundCaster() *DownsamplingRound } diff --git a/typedapi/types/dropprocessor.go b/typedapi/types/dropprocessor.go index fbd1af8946..5aa519ede3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // DropProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L846-L846 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L846-L846 type DropProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -122,8 +122,6 @@ func NewDropProcessor() *DropProcessor { return r } -// true - type DropProcessorVariant interface { DropProcessorCaster() *DropProcessor } diff --git a/typedapi/types/duration.go b/typedapi/types/duration.go index 358bd92e5d..123080c23a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -24,7 +24,7 @@ package types // // string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Time.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L52-L58 type Duration any type DurationVariant interface { diff --git a/typedapi/types/durationvalueunitfloatmillis.go b/typedapi/types/durationvalueunitfloatmillis.go index 05509a485e..1343045791 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // DurationValueUnitFloatMillis type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L67-L67 type DurationValueUnitFloatMillis Float64 diff --git a/typedapi/types/durationvalueunitmillis.go b/typedapi/types/durationvalueunitmillis.go index dac492da7a..08cf00e365 100644 --- a/typedapi/types/durationvalueunitmillis.go +++ b/typedapi/types/durationvalueunitmillis.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // DurationValueUnitMillis type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L67-L67 type DurationValueUnitMillis int64 type DurationValueUnitMillisVariant interface { diff --git a/typedapi/types/durationvalueunitnanos.go b/typedapi/types/durationvalueunitnanos.go index 199db5d9ae..aee73de883 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // DurationValueUnitNanos type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L67-L67 type DurationValueUnitNanos int64 diff --git a/typedapi/types/durationvalueunitseconds.go b/typedapi/types/durationvalueunitseconds.go index b01bf837ce..45bc05691f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // DurationValueUnitSeconds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Time.ts#L67-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L67-L67 type DurationValueUnitSeconds int64 diff --git a/typedapi/types/dutchanalyzer.go b/typedapi/types/dutchanalyzer.go index 2ff075748e..059ad7677d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // DutchAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L145-L150 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L145-L150 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": @@ -119,8 +108,6 @@ func NewDutchAnalyzer() *DutchAnalyzer { return r } -// true - type DutchAnalyzerVariant interface { DutchAnalyzerCaster() *DutchAnalyzer } @@ -128,3 +115,8 @@ type DutchAnalyzerVariant interface { func (s *DutchAnalyzer) DutchAnalyzerCaster() *DutchAnalyzer { return s } + +func (s *DutchAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/dutchstemtokenfilter.go b/typedapi/types/dutchstemtokenfilter.go new file mode 100644 index 0000000000..ab5529248a --- /dev/null +++ b/typedapi/types/dutchstemtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// DutchStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type DutchStemTokenFilterVariant interface { + DutchStemTokenFilterCaster() *DutchStemTokenFilter +} + +func (s *DutchStemTokenFilter) DutchStemTokenFilterCaster() *DutchStemTokenFilter { + return s +} + +func (s *DutchStemTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/dynamicproperty.go b/typedapi/types/dynamicproperty.go index e3342f5dd3..ef551e6713 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -38,7 +38,7 @@ import ( // DynamicProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L335-L366 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L353-L384 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 { @@ -1135,8 +1147,6 @@ func NewDynamicProperty() *DynamicProperty { return r } -// true - type DynamicPropertyVariant interface { DynamicPropertyCaster() *DynamicProperty } @@ -1144,3 +1154,8 @@ type DynamicPropertyVariant interface { func (s *DynamicProperty) DynamicPropertyCaster() *DynamicProperty { return s } + +func (s *DynamicProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/dynamictemplate.go b/typedapi/types/dynamictemplate.go index 4ca0f742e2..b9b27d9a18 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // DynamicTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/dynamic-template.ts#L23-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -549,8 +555,6 @@ func NewDynamicTemplate() *DynamicTemplate { return r } -// true - type DynamicTemplateVariant interface { DynamicTemplateCaster() *DynamicTemplate } diff --git a/typedapi/types/edgengramtokenfilter.go b/typedapi/types/edgengramtokenfilter.go index 3bebc0dc5a..73ad4966eb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,14 +33,20 @@ import ( // EdgeNGramTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L78-L84 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -139,8 +145,6 @@ func NewEdgeNGramTokenFilter() *EdgeNGramTokenFilter { return r } -// true - type EdgeNGramTokenFilterVariant interface { EdgeNGramTokenFilterCaster() *EdgeNGramTokenFilter } @@ -148,3 +152,8 @@ type EdgeNGramTokenFilterVariant interface { func (s *EdgeNGramTokenFilter) EdgeNGramTokenFilterCaster() *EdgeNGramTokenFilter { return s } + +func (s *EdgeNGramTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/edgengramtokenizer.go b/typedapi/types/edgengramtokenizer.go index 21f19b0c2b..c218eb5b5c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // EdgeNGramTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L48-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L48-L58 type EdgeNGramTokenizer struct { CustomTokenChars *string `json:"custom_token_chars,omitempty"` MaxGram *int `json:"max_gram,omitempty"` @@ -146,8 +146,6 @@ func NewEdgeNGramTokenizer() *EdgeNGramTokenizer { return r } -// true - type EdgeNGramTokenizerVariant interface { EdgeNGramTokenizerCaster() *EdgeNGramTokenizer } @@ -155,3 +153,8 @@ type EdgeNGramTokenizerVariant interface { func (s *EdgeNGramTokenizer) EdgeNGramTokenizerCaster() *EdgeNGramTokenizer { return s } + +func (s *EdgeNGramTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} 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 46fc7b8dfb..7b7353d7c2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ElasticsearchServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L704-L738 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -153,8 +153,6 @@ func NewElasticsearchServiceSettings() *ElasticsearchServiceSettings { return r } -// true - type ElasticsearchServiceSettingsVariant interface { ElasticsearchServiceSettingsCaster() *ElasticsearchServiceSettings } diff --git a/typedapi/types/elasticsearchtasksettings.go b/typedapi/types/elasticsearchtasksettings.go index 78d5f11b61..ebb7c9c57a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ElasticsearchTaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L740-L746 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -78,8 +78,6 @@ func NewElasticsearchTaskSettings() *ElasticsearchTaskSettings { return r } -// true - type ElasticsearchTaskSettingsVariant interface { ElasticsearchTaskSettingsCaster() *ElasticsearchTaskSettings } diff --git a/typedapi/types/elasticsearchversioninfo.go b/typedapi/types/elasticsearchversioninfo.go index a64aec9e10..8266d097a7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ElasticsearchVersionInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Base.ts#L76-L115 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f42c3a0954..b7f9a666a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ElasticsearchVersionMinInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Base.ts#L117-L125 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8391e72d69..ddbc139628 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,13 +31,30 @@ import ( // ElisionTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L188-L193 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -115,8 +132,6 @@ func NewElisionTokenFilter() *ElisionTokenFilter { return r } -// true - type ElisionTokenFilterVariant interface { ElisionTokenFilterCaster() *ElisionTokenFilter } @@ -124,3 +139,8 @@ type ElisionTokenFilterVariant interface { func (s *ElisionTokenFilter) ElisionTokenFilterCaster() *ElisionTokenFilter { return s } + +func (s *ElisionTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/elserservicesettings.go b/typedapi/types/elserservicesettings.go index d7cb19ac2f..3a55756568 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ElserServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L758-L784 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -126,8 +126,6 @@ func NewElserServiceSettings() *ElserServiceSettings { return r } -// true - type ElserServiceSettingsVariant interface { ElserServiceSettingsCaster() *ElserServiceSettings } diff --git a/typedapi/types/email.go b/typedapi/types/email.go index 797a5fceea..9fc58f6e8f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // Email type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L238-L250 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 55dc081f7c..0178033abf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // EmailAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L252-L252 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L252-L252 type EmailAction struct { Attachments map[string]EmailAttachmentContainer `json:"attachments,omitempty"` Bcc []string `json:"bcc,omitempty"` @@ -193,8 +193,6 @@ func NewEmailAction() *EmailAction { return r } -// true - type EmailActionVariant interface { EmailActionCaster() *EmailAction } diff --git a/typedapi/types/emailattachmentcontainer.go b/typedapi/types/emailattachmentcontainer.go index efb9e19b8b..bc9abb892e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // EmailAttachmentContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L211-L216 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L211-L216 type EmailAttachmentContainer struct { AdditionalEmailAttachmentContainerProperty map[string]json.RawMessage `json:"-"` Data *DataEmailAttachment `json:"data,omitempty"` @@ -73,8 +73,6 @@ func NewEmailAttachmentContainer() *EmailAttachmentContainer { return r } -// true - type EmailAttachmentContainerVariant interface { EmailAttachmentContainerCaster() *EmailAttachmentContainer } diff --git a/typedapi/types/emailbody.go b/typedapi/types/emailbody.go index 6689548c26..e7670671a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // EmailBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L192-L195 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L192-L195 type EmailBody struct { Html *string `json:"html,omitempty"` Text *string `json:"text,omitempty"` @@ -88,8 +88,6 @@ func NewEmailBody() *EmailBody { return r } -// true - type EmailBodyVariant interface { EmailBodyCaster() *EmailBody } diff --git a/typedapi/types/emailresult.go b/typedapi/types/emailresult.go index ff1f4dce97..d077cb4ff2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // EmailResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L205-L209 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2a334a0b91..92695d678a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // EmptyObject type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L157-L158 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L157-L158 type EmptyObject struct { } @@ -33,8 +33,6 @@ func NewEmptyObject() *EmptyObject { return r } -// true - type EmptyObjectVariant interface { EmptyObjectCaster() *EmptyObject } diff --git a/typedapi/types/englishanalyzer.go b/typedapi/types/englishanalyzer.go index f72b603d34..57758592c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // EnglishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L152-L157 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L152-L157 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": @@ -119,8 +108,6 @@ func NewEnglishAnalyzer() *EnglishAnalyzer { return r } -// true - type EnglishAnalyzerVariant interface { EnglishAnalyzerCaster() *EnglishAnalyzer } @@ -128,3 +115,8 @@ type EnglishAnalyzerVariant interface { func (s *EnglishAnalyzer) EnglishAnalyzerCaster() *EnglishAnalyzer { return s } + +func (s *EnglishAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/enrichpolicy.go b/typedapi/types/enrichpolicy.go index c37fe8929a..d56a81daa1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // EnrichPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/_types/Policy.ts#L34-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/enrich/_types/Policy.ts#L34-L41 type EnrichPolicy struct { ElasticsearchVersion *string `json:"elasticsearch_version,omitempty"` EnrichFields []string `json:"enrich_fields"` @@ -127,8 +127,6 @@ func NewEnrichPolicy() *EnrichPolicy { return r } -// true - type EnrichPolicyVariant interface { EnrichPolicyCaster() *EnrichPolicy } diff --git a/typedapi/types/enrichprocessor.go b/typedapi/types/enrichprocessor.go index a6fe765e6a..70050ef559 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // EnrichProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L848-L887 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L848-L887 type EnrichProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -222,8 +222,6 @@ func NewEnrichProcessor() *EnrichProcessor { return r } -// true - type EnrichProcessorVariant interface { EnrichProcessorCaster() *EnrichProcessor } diff --git a/typedapi/types/ensemble.go b/typedapi/types/ensemble.go index 55d6641f47..b9e88b1ed6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Ensemble type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/types.ts#L93-L99 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L93-L99 type Ensemble struct { AggregateOutput *AggregateOutput `json:"aggregate_output,omitempty"` ClassificationLabels []string `json:"classification_labels,omitempty"` @@ -99,8 +99,6 @@ func NewEnsemble() *Ensemble { return r } -// true - type EnsembleVariant interface { EnsembleCaster() *Ensemble } diff --git a/typedapi/types/enums/accesstokengranttype/accesstokengranttype.go b/typedapi/types/enums/accesstokengranttype/accesstokengranttype.go index b7062028c0..fe9bf99834 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package accesstokengranttype package accesstokengranttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_token/types.ts#L23-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5285bd92e5..cfb5ab4077 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package acknowledgementoptions package acknowledgementoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Action.ts#L103-L107 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 aa531a63ef..a51dd87754 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package actionexecutionmode package actionexecutionmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Action.ts#L67-L88 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ef5c30264e..f41d4ab0af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package actionstatusoptions package actionstatusoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Action.ts#L96-L101 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eddfd70872..b288d64453 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package actiontype package actiontype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Action.ts#L58-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 87e6bcddfe..a29611f514 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package alibabacloudservicetype package alibabacloudservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L289-L291 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 875d3ffbc8..21fca0b7a2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package alibabacloudtasktype package alibabacloudtasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L282-L287 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e89affa552..998fb01fad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package allocationexplaindecision package allocationexplaindecision import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/types.ts#L33-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b9d4e64b0b..2bb7d2191e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package amazonbedrockservicetype package amazonbedrockservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L368-L370 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b9ac54dec4..5915d1c90d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package amazonbedrocktasktype package amazonbedrocktasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L363-L366 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..9c2b6f3c67 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package amazonsagemakerapi +package amazonsagemakerapi + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..573fa6db29 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package amazonsagemakerservicetype +package amazonsagemakerservicetype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 caefe3a7cd..4e29fb1796 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package anthropicservicetype package anthropicservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L421-L423 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 17b8d33667..567fe533e5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package anthropictasktype package anthropictasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L417-L419 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eead0518d3..cd45582fdd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package apikeygranttype package apikeygranttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/grant_api_key/types.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 22a0b3a016..855a7dfcb2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package apikeytype package apikeytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/ApiKey.ts#L115-L118 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 de4a3dde66..86d24a7413 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package appliesto package appliesto import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Rule.ts#L67-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 24332ce9b1..0be69aedf5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package azureaistudioservicetype package azureaistudioservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L504-L506 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 027120d9c7..01d1baf715 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package azureaistudiotasktype package azureaistudiotasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L499-L502 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fca2c9854e..49c6d134f9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package azureopenaiservicetype package azureopenaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L568-L570 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 89466bad89..dbe7339ad8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package azureopenaitasktype package azureopenaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L563-L566 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f6180e2c8d..a01808f5fe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package boundaryscanner package boundaryscanner import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/highlighting.ts#L26-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 38ec8ea17c..fbf2a7dc40 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package bytes package bytes import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L166-L178 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L166-L178 type Bytes struct { Name string } diff --git a/typedapi/types/enums/calendarinterval/calendarinterval.go b/typedapi/types/enums/calendarinterval/calendarinterval.go index e0479c4f50..5e28386de1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package calendarinterval package calendarinterval import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L262-L279 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1f036ab213..5ea53cd780 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package cardinalityexecutionmode package cardinalityexecutionmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L64-L85 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 95c3f47c3f..4c73a31040 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package catanomalydetectorcolumn package catanomalydetectorcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/_types/CatBase.ts#L32-L401 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7d2f1c26be..7573760c4f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package catdatafeedcolumn package catdatafeedcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/_types/CatBase.ts#L405-L471 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 57199147bb..17a40669db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package catdfacolumn package catdfacolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/_types/CatBase.ts#L472-L557 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9aab9eb8d1..e6be89abec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package categorizationstatus package categorizationstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Model.ts#L84-L87 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..702b76c351 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package catnodecolumn +package catnodecolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..422f8edef2 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package catrecoverycolumn +package catrecoverycolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..964317f702 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package catsegmentscolumn +package catsegmentscolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..00527a45a8 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package catshardcolumn +package catshardcolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..2deaca9ad9 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package catsnapshotscolumn +package catsnapshotscolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..ac0ebe1f05 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package catthreadpoolcolumn +package catthreadpoolcolumn + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 97aee25b29..565a159e98 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package cattrainedmodelscolumn package cattrainedmodelscolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/_types/CatBase.ts#L561-L635 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7c2a70c13e..12707528cd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package cattransformcolumn package cattransformcolumn import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/_types/CatBase.ts#L640-L844 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 59c98dd9c8..0eae5c5f49 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package childscoremode package childscoremode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/joining.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 006181da61..60154f4685 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package chunkingmode package chunkingmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Datafeed.ts#L245-L249 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..93c3866fab --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package cjkbigramignoredscript +package cjkbigramignoredscript + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a92050883f..f1e2c8f381 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package clusterinfotarget package clusterinfotarget import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L378-L384 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L380-L386 type ClusterInfoTarget struct { Name string } diff --git a/typedapi/types/enums/clusterprivilege/clusterprivilege.go b/typedapi/types/enums/clusterprivilege/clusterprivilege.go index bea48cc77e..e62f5109e0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package clusterprivilege package clusterprivilege import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L42-L201 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L42-L201 type ClusterPrivilege struct { Name string } diff --git a/typedapi/types/enums/clustersearchstatus/clustersearchstatus.go b/typedapi/types/enums/clustersearchstatus/clustersearchstatus.go index 6b764db526..1933e22efc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package clustersearchstatus package clustersearchstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L37-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3dd375e077..0e91e5ce9e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package cohereembeddingtype package cohereembeddingtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L625-L629 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d11498ba68..555faaac05 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package cohereinputtype package cohereinputtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L631-L636 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 10df64fad6..c170c00438 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package cohereservicetype package cohereservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L621-L623 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9baf735937..0d37e4d057 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package coheresimilaritytype package coheresimilaritytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L638-L642 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bc3a622372..3be60a564d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package coheretasktype package coheretasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L615-L619 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 30511550c6..c53da789fc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package coheretruncatetype package coheretruncatetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L644-L648 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0e368464f9..ef4eb0275a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package combinedfieldsoperator package combinedfieldsoperator import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/abstractions.ts#L519-L522 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 be7a45ce02..e6dd68066c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package combinedfieldszeroterms package combinedfieldszeroterms import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/abstractions.ts#L524-L533 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0daaef0e04..e7f3360327 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package conditionop package conditionop import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Conditions.ts#L42-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L42-L49 type ConditionOp struct { Name string } diff --git a/typedapi/types/enums/conditionoperator/conditionoperator.go b/typedapi/types/enums/conditionoperator/conditionoperator.go index 1c5a990dd4..d402d0405a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package conditionoperator package conditionoperator import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Rule.ts#L74-L79 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 26411740ef..42910f2105 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package conditiontype package conditiontype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Conditions.ts#L65-L71 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L65-L71 type ConditionType struct { Name string } diff --git a/typedapi/types/enums/conflicts/conflicts.go b/typedapi/types/enums/conflicts/conflicts.go index ec4e28d1a1..56fd051fca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package conflicts package conflicts import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L180-L189 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L180-L189 type Conflicts struct { Name string } diff --git a/typedapi/types/enums/connectionscheme/connectionscheme.go b/typedapi/types/enums/connectionscheme/connectionscheme.go index b78c2c2ddf..cf9c1f8f2a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package connectionscheme package connectionscheme import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 576924f9ee..6c76dd3b06 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package connectorfieldtype package connectorfieldtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L43-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9e1738f57e..b706c66dd8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package connectorstatus package connectorstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L130-L136 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a48f4aa77a..8b7fe375ef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package converttype package converttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L662-L671 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L662-L671 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..2ed6c730d1 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package customservicetype +package customservicetype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..511f2ea5b5 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package customtasktype +package customtasktype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 27b880b2d2..295774bda0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package dataattachmentformat package dataattachmentformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L187-L190 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 edd2e216c6..ad25520cb9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package datafeedstate package datafeedstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Datafeed.ts#L136-L141 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fa7c94d1a7..8613ed6f93 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package dataframestate package dataframestate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Dataframe.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 79322e5fb0..c95d9e0baa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package day package day import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Schedule.ts#L37-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4a410459ec..d7b5eb2c6d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package decision package decision import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/types.ts#L92-L101 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..47ca3e771b --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package deepseekservicetype +package deepseekservicetype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8a33d1eab1..749eac0ad5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package delimitedpayloadencoding package delimitedpayloadencoding import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L61-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 62aa800185..d85cd4eb78 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package densevectorelementtype package densevectorelementtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/DenseVectorProperty.ts#L64-L80 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 294a4691d7..3dfa7ba2e4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package densevectorindexoptionstype package densevectorindexoptionstype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/DenseVectorProperty.ts#L168-L213 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/DenseVectorProperty.ts#L168-L213 type DenseVectorIndexOptionsType struct { Name string } diff --git a/typedapi/types/enums/densevectorsimilarity/densevectorsimilarity.go b/typedapi/types/enums/densevectorsimilarity/densevectorsimilarity.go index 2910158027..250c89b85f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package densevectorsimilarity package densevectorsimilarity import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/DenseVectorProperty.ts#L82-L127 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f964db2ddf..4d2878a9f5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package deploymentallocationstate package deploymentallocationstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L331-L344 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3d74d6e723..a121d04740 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package deploymentassignmentstate package deploymentassignmentstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L346-L363 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fa785d41dc..cc7c365f06 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package deprecationlevel package deprecationlevel import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/migration/deprecations/types.ts#L23-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 483204170a..69095efc3f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package dfiindependencemeasure package dfiindependencemeasure import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Similarity.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6a3c9cf650..493646f67b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package dfraftereffect package dfraftereffect import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Similarity.ts#L26-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d4a1d2c90f..37190fa412 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package dfrbasicmodel package dfrbasicmodel import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Similarity.ts#L32-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 47a3158edd..f03b2644c3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package displaytype package displaytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L35-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f4131e8d4a..68307ce1d3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package distanceunit package distanceunit import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L30-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 64b4fc8da0..58d358640c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package dynamicmapping package dynamicmapping import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/dynamic-template.ts#L50-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4ed4eabe83..f92d1d0def 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package ecscompatibilitytype package ecscompatibilitytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/_types/Structure.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 27a6f607cc..7bdc00f6b2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package edgengramside package edgengramside import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L73-L76 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0dfd93de0c..c4320fa738 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package elasticsearchservicetype package elasticsearchservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L754-L756 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4ba7b82d4b..6ecd0415a2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package elasticsearchtasktype package elasticsearchtasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L748-L752 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e80f27a49a..8d8c3a11cd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package elserservicetype package elserservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L790-L792 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d838cd57dd..f279b8baf8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package elsertasktype package elsertasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L786-L788 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f3e2236488..90800904c6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package emailpriority package emailpriority import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L197-L203 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 887d30bbcf..24de6cf248 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package enrichpolicyphase package enrichpolicyphase import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/execute_policy/types.ts#L25-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 index 0878f1e844..63613af9ed 100644 --- a/typedapi/types/enums/esqlclusterstatus/esqlclusterstatus.go +++ b/typedapi/types/enums/esqlclusterstatus/esqlclusterstatus.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package esqlclusterstatus package esqlclusterstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/_types/EsqlResult.ts#L72-L78 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/EsqlResult.ts#L83-L89 type EsqlClusterStatus struct { Name string } diff --git a/typedapi/types/enums/esqlformat/esqlformat.go b/typedapi/types/enums/esqlformat/esqlformat.go index 0b067f8a81..5948dd0d9f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package esqlformat package esqlformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/_types/QueryParameters.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/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 547a7ac467..967a7dd7cc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package eventtype package eventtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/_types/AnalyticsEvent.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b4af284a6c..172a8bf2cd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package excludefrequent package excludefrequent import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Detector.ts#L145-L150 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9a8c08ecc2..e98477af6a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package executionphase package executionphase import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Execution.ts#L49-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 15a55ad341..d8b4977930 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package executionstatus package executionstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Execution.ts#L38-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 08432b9703..661fc67308 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package expandwildcard package expandwildcard import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L198-L212 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L198-L212 type ExpandWildcard struct { Name string } diff --git a/typedapi/types/enums/failurestorestatus/failurestorestatus.go b/typedapi/types/enums/failurestorestatus/failurestorestatus.go index 48fc3825a4..c92c2fbdfb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package failurestorestatus package failurestorestatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/bulk/types.ts#L86-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ca5e966cc8..6546c9ba6a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package feature package feature import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get/IndicesGetRequest.ts#L98-L102 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5d9b7e8152..3094e1c0a7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package fieldsortnumerictype package fieldsortnumerictype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/sort.ts#L36-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d387e2eeea..4b1b4a7c77 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package fieldtype package fieldtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/Property.ts#L191-L240 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6d3eec7f32..41116b2df3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package fieldvaluefactormodifier package fieldvaluefactormodifier import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L323-L366 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6b2cc1c082..26b3f525a1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package filteringpolicy package filteringpolicy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L155-L158 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c4fedd5c88..93afaef22d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package filteringrulerule package filteringrulerule import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L160-L168 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 68a70823a3..1d0245e397 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package filteringvalidationstate package filteringvalidationstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L186-L190 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bcbbd2a71d..0a1effb8db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package filtertype package filtertype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Filter.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2abe4408aa..b7d71a7bc8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package fingerprintdigest package fingerprintdigest import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L897-L903 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L897-L903 type FingerprintDigest struct { Name string } diff --git a/typedapi/types/enums/followerindexstatus/followerindexstatus.go b/typedapi/types/enums/followerindexstatus/followerindexstatus.go index e7080a9553..2e14148a47 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package followerindexstatus package followerindexstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/follow_info/types.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8287024c99..7da8a36bf3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package formattype package formattype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/_types/Structure.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 49d89c49d1..847c8698cb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package functionboostmode package functionboostmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L295-L321 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 906902aedf..8303d55223 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package functionscoremode package functionscoremode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L268-L293 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f9ed9b4ea2..2db74665c5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package gappolicy package gappolicy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L61-L76 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 89cc55246f..d48b1a74d6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package geodistancetype package geodistancetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L42-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 94acd02931..44f681e519 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package geoexecution package geoexecution import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/geo.ts#L59-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9fce989db0..422858012f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package geogridtargetformat package geogridtargetformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L438-L441 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L438-L441 type GeoGridTargetFormat struct { Name string } diff --git a/typedapi/types/enums/geogridtiletype/geogridtiletype.go b/typedapi/types/enums/geogridtiletype/geogridtiletype.go index c50116db20..bbf96ef6de 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package geogridtiletype package geogridtiletype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L432-L436 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L432-L436 type GeoGridTileType struct { Name string } diff --git a/typedapi/types/enums/geoorientation/geoorientation.go b/typedapi/types/enums/geoorientation/geoorientation.go index 6f0958dcc4..d80acb07d0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package geoorientation package geoorientation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/geo.ts#L34-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..0988ce3d9b --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package geopointmetrictype +package geopointmetrictype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b584e4a795..192fbd4a7c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package geoshaperelation package geoshaperelation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L64-L82 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b8f7b9d6b3..a0d71b3893 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package geostrategy package geostrategy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/geo.ts#L57-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 12e74b141a..26aaa052f4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package geovalidationmethod package geovalidationmethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/geo.ts#L173-L183 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3d46faf9ed..f929024561 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package googleaiservicetype package googleaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L817-L819 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6cec235f89..2b2da58bc9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package googleaistudiotasktype package googleaistudiotasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L812-L815 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cab88f364b..e54c1b506c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package googlevertexaiservicetype package googlevertexaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L865-L867 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4a2ba510e8..47fae42977 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package googlevertexaitasktype package googlevertexaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L860-L863 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0de1bc2ed7..4bbf9c1ced 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package granttype package granttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/GrantType.ts#L20-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 04b247aa6d..18f876462d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package gridaggregationtype package gridaggregationtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search_mvt/_types/GridType.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a8f5026c76..5a31f7c46d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package gridtype package gridtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search_mvt/_types/GridType.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 031dea75c1..a162ab6201 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package groupby package groupby import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/tasks/_types/GroupBy.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0df21b9024..6e590ba7ca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package healthstatus package healthstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L216-L236 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L216-L238 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 e20df25741..4e3e6c1ebe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package highlighterencoder package highlighterencoder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/highlighting.ts#L157-L160 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L159-L162 type HighlighterEncoder struct { Name string } diff --git a/typedapi/types/enums/highlighterfragmenter/highlighterfragmenter.go b/typedapi/types/enums/highlighterfragmenter/highlighterfragmenter.go index 3f7aca82a1..7f5a698d35 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package highlighterfragmenter package highlighterfragmenter import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/highlighting.ts#L162-L165 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L164-L167 type HighlighterFragmenter struct { Name string } diff --git a/typedapi/types/enums/highlighterorder/highlighterorder.go b/typedapi/types/enums/highlighterorder/highlighterorder.go index b1ae04c55e..6f89cc1f01 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package highlighterorder package highlighterorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/highlighting.ts#L167-L169 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L169-L171 type HighlighterOrder struct { Name string } diff --git a/typedapi/types/enums/highlightertagsschema/highlightertagsschema.go b/typedapi/types/enums/highlightertagsschema/highlightertagsschema.go index a1e1663fc7..1fb473020c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package highlightertagsschema package highlightertagsschema import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/highlighting.ts#L171-L173 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L173-L175 type HighlighterTagsSchema struct { Name string } diff --git a/typedapi/types/enums/highlightertype/highlightertype.go b/typedapi/types/enums/highlightertype/highlightertype.go index d4e6eb0666..bf46da7afc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package highlightertype package highlightertype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/highlighting.ts#L175-L190 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L177-L192 type HighlighterType struct { Name string } diff --git a/typedapi/types/enums/holtwinterstype/holtwinterstype.go b/typedapi/types/enums/holtwinterstype/holtwinterstype.go index 2773524edf..0fc773d11a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package holtwinterstype package holtwinterstype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L309-L312 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5f5bf9ed3e..c3d78b3a94 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package httpinputmethod package httpinputmethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L59-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4df364dff1..a40f5dea28 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package huggingfaceservicetype package huggingfaceservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L896-L898 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f537000c37..77db31e0ba 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package huggingfacetasktype package huggingfacetasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L892-L894 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f542b2d667..35f6c1b00c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package ibdistribution package ibdistribution import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Similarity.ts#L42-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 357924f68b..802b8cf215 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package iblambda package iblambda import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Similarity.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cb4d298cb9..3c65f362b4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package icucollationalternate package icucollationalternate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L89-L92 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0aeb219aa3..132b82bc84 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package icucollationcasefirst package icucollationcasefirst import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L94-L97 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 23279b0f6f..d671bbfed5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package icucollationdecomposition package icucollationdecomposition import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L99-L102 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0b3da77d54..dfc900d7fa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package icucollationstrength package icucollationstrength import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L104-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cb62a73e30..14f1f36aa9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package icunormalizationmode package icunormalizationmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f4ec9caa54..d98db7fca8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package icunormalizationtype package icunormalizationtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L83-L87 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bdb4652f50..1a33854b64 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package icutransformdirection package icutransformdirection import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L73-L76 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 202971ff5d..3b62f1e4e0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package impactarea package impactarea import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L74-L79 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L75-L80 type ImpactArea struct { Name string } diff --git a/typedapi/types/enums/include/include.go b/typedapi/types/enums/include/include.go index 7e37ee4c66..58df05437b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package include package include import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Include.ts#L20-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e6fee812f0..8643d516c7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package indexcheckonstartup package indexcheckonstartup import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L270-L277 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L283-L290 type IndexCheckOnStartup struct { Name string } diff --git a/typedapi/types/enums/indexingjobstate/indexingjobstate.go b/typedapi/types/enums/indexingjobstate/indexingjobstate.go index 56dcd733f6..19c0244e2a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package indexingjobstate package indexingjobstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_jobs/types.ts#L77-L83 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7cd5a569a5..322ea13c57 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package indexmetadatastate package indexmetadatastate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L225-L232 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/stats/types.ts#L225-L232 type IndexMetadataState struct { Name string } diff --git a/typedapi/types/enums/indexmode/indexmode.go b/typedapi/types/enums/indexmode/indexmode.go index d115ddbf64..219eca1fbb 100644 --- a/typedapi/types/enums/indexmode/indexmode.go +++ b/typedapi/types/enums/indexmode/indexmode.go @@ -16,14 +16,14 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package indexmode package indexmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/DataStream.ts#L40-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L41-L46 type IndexMode struct { Name string } diff --git a/typedapi/types/enums/indexoptions/indexoptions.go b/typedapi/types/enums/indexoptions/indexoptions.go index 994c6af52f..0d7f51827c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package indexoptions package indexoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L291-L296 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L309-L314 type IndexOptions struct { Name string } diff --git a/typedapi/types/enums/indexprivilege/indexprivilege.go b/typedapi/types/enums/indexprivilege/indexprivilege.go index 6531ee1b9a..28a5924c35 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package indexprivilege package indexprivilege import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L388-L430 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L388-L430 type IndexPrivilege struct { Name string } diff --git a/typedapi/types/enums/indexroutingallocationoptions/indexroutingallocationoptions.go b/typedapi/types/enums/indexroutingallocationoptions/indexroutingallocationoptions.go index 9b8e319317..c8d3290959 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package indexroutingallocationoptions package indexroutingallocationoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexRouting.ts#L38-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 80405f8563..e997f99384 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package indexroutingrebalanceoptions package indexroutingrebalanceoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexRouting.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 62c8c58ad7..bf2ef62938 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package indicatorhealthstatus package indicatorhealthstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L25-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e4871d4b1d..8aca525bf9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package indicesblockoptions package indicesblockoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/add_block/IndicesAddBlockRequest.ts#L91-L100 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L272-L281 type IndicesBlockOptions struct { Name string } diff --git a/typedapi/types/enums/inputtype/inputtype.go b/typedapi/types/enums/inputtype/inputtype.go index 1e76cc5fad..548f090c3c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package inputtype package inputtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L100-L104 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dff360a9bf..6c0ce80515 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package jinaaiservicetype package jinaaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L959-L961 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ac203cec2f..9b57eb7612 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package jinaaisimilaritytype package jinaaisimilaritytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L963-L967 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 068667ae1f..5f95253f3f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package jinaaitasktype package jinaaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L954-L957 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 42a1a029b0..070828bf64 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package jinaaitextembeddingtask package jinaaitextembeddingtask import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L969-L974 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4a813b5e4f..222c153fe8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package jobblockedreason package jobblockedreason import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Job.ts#L397-L401 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bbb89f1c4a..1120d42c95 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package jobstate package jobstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Job.ts#L36-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 38c8b23356..94dceb6319 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package jsonprocessorconflictstrategy package jsonprocessorconflictstrategy import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1170-L1175 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1170-L1175 type JsonProcessorConflictStrategy struct { Name string } diff --git a/typedapi/types/enums/keeptypesmode/keeptypesmode.go b/typedapi/types/enums/keeptypesmode/keeptypesmode.go index 39d8b5155d..53a9d97036 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package keeptypesmode package keeptypesmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L214-L217 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b2b83e806f..ab76e5d7ae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package kuromojitokenizationmode package kuromojitokenizationmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/kuromoji-plugin.ts#L52-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 aa09ec4516..64e303476c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package level package level import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L246-L250 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L248-L252 type Level struct { Name string } diff --git a/typedapi/types/enums/licensestatus/licensestatus.go b/typedapi/types/enums/licensestatus/licensestatus.go index 295e50861f..b74beddedb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package licensestatus package licensestatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/_types/License.ts#L35-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5a74b72787..f079fceee2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package licensetype package licensetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/_types/License.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3517e84b96..43bd3658b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package lifecycleoperationmode package lifecycleoperationmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Lifecycle.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..1e981c1b58 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package lowercasetokenfilterlanguages +package lowercasetokenfilterlanguages + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e6c20a93aa..45a0a31587 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package managedby package managedby import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/DataStream.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L33-L38 type ManagedBy struct { Name string } diff --git a/typedapi/types/enums/matchtype/matchtype.go b/typedapi/types/enums/matchtype/matchtype.go index 1bc8c309ca..ca26d7b3c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package matchtype package matchtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/dynamic-template.ts#L45-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0e56f86366..b255caed0e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package memorystatus package memorystatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Model.ts#L89-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 007a57fce8..743bddb095 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package metric package metric import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/_types/Metric.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 36d2ef75e0..b1e296dc2b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package migrationstatus package migrationstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0df7faa9d2..42ee4e422a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package minimuminterval package minimuminterval import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L112-L119 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 20a32cc335..e8a97e4127 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package missingorder package missingorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/AggregationContainer.ts#L536-L540 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 53bd04c587..6870487d95 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package mistralservicetype package mistralservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1009-L1011 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2efb4dda39..8b04a494e1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package mistraltasktype package mistraltasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1005-L1007 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 33aaa241de..0207d01c5b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package modeenum package modeenum import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L54-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ca28db53cd..25e7d08c5f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package month package month import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Schedule.ts#L65-L78 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c53cf07a3b..651cf04ec4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package multivaluemode package multivaluemode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L368-L385 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5bc8da46bb..50c6429f2f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package noderole package noderole import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Node.ts#L71-L89 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1b9e066dc4..9d2d41f890 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package noridecompoundmode package noridecompoundmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/nori-plugin.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3b1caaca08..bab33ebda8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package normalization package normalization import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Similarity.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ae93f1fdc5..6e5e3450d4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package normalizemethod package normalizemethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L361-L387 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fd3862ab5f..10733e969f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package numericfielddataformat package numericfielddataformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/NumericFielddataFormat.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7a1697649e..13a66aaadb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package onscripterror package onscripterror import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L151-L154 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L152-L155 type OnScriptError struct { Name string } diff --git a/typedapi/types/enums/openaiservicetype/openaiservicetype.go b/typedapi/types/enums/openaiservicetype/openaiservicetype.go index 64120179e0..308927ad24 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package openaiservicetype package openaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1071-L1073 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6b17c14b11..51c0e304db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package openaitasktype package openaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1065-L1069 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e8e3457d0f..fb71041410 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package operationtype package operationtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/bulk/types.ts#L93-L98 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d071f60549..dc52047e7f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package operator package operator import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/Operator.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 90d2cf812f..60b622ac39 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package optype package optype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L252-L261 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L254-L263 type OpType struct { Name string } diff --git a/typedapi/types/enums/pagerdutycontexttype/pagerdutycontexttype.go b/typedapi/types/enums/pagerdutycontexttype/pagerdutycontexttype.go index 8e643415cf..57f81ce250 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package pagerdutycontexttype package pagerdutycontexttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L67-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c30f104c3b..4a1aa8097b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package pagerdutyeventtype package pagerdutyeventtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L72-L76 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fce47252c5..91a22d3075 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package painlesscontext package painlesscontext import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/scripts_painless_execute/types.ts#L57-L80 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cfac8be0f2..e974eb327c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package phoneticencoder package phoneticencoder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/phonetic-plugin.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 57a05e62f2..d8bbd9a512 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package phoneticlanguage package phoneticlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/phonetic-plugin.ts#L38-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ac9fefb7ef..0a8e3eed8d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package phoneticnametype package phoneticnametype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/phonetic-plugin.ts#L53-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8a64c43583..9e8d68e2b7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package phoneticruletype package phoneticruletype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/phonetic-plugin.ts#L59-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..a418aabe70 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package pipelinesimulationstatusoptions +package pipelinesimulationstatusoptions + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ba3421df18..75ac0c2272 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package policytype package policytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/_types/Policy.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4cc4a3a5e8..9e1de8bd1c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package quantifier package quantifier import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Conditions.ts#L75-L78 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L75-L78 type Quantifier struct { Name string } diff --git a/typedapi/types/enums/queryrulecriteriatype/queryrulecriteriatype.go b/typedapi/types/enums/queryrulecriteriatype/queryrulecriteriatype.go index 6def1c5917..bf684d4901 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package queryrulecriteriatype package queryrulecriteriatype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/_types/QueryRuleset.ts#L95-L108 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d9c44d8682..bcdc9ee8ca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package queryruletype package queryruletype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/_types/QueryRuleset.ts#L60-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3a3daa5879..bbf25c8215 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package rangerelation package rangerelation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L188-L201 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L184-L197 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..7749a1880b --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package rankvectorelementtype +package rankvectorelementtype + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L386-L390 +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 d46f455fe2..f861de1eb9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package ratemode package ratemode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L252-L261 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2debafba69..a580817b39 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package refresh package refresh import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L263-L270 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L265-L272 type Refresh struct { Name string } diff --git a/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.go b/typedapi/types/enums/remoteclusterprivilege/remoteclusterprivilege.go index 3139861334..fedefee1b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package remoteclusterprivilege package remoteclusterprivilege import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L203-L215 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L203-L215 type RemoteClusterPrivilege struct { Name string } diff --git a/typedapi/types/enums/responsecontenttype/responsecontenttype.go b/typedapi/types/enums/responsecontenttype/responsecontenttype.go index 0482084289..9530c57909 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package responsecontenttype package responsecontenttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L106-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2dda0df275..4c2c5c9284 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package restrictionworkflow package restrictionworkflow import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/RoleDescriptor.ts#L143-L146 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 59fdcd8846..f4a371324b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package result package result import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Result.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bcf11a91fb..e188de5e58 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package resultposition package resultposition import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/eql/search/types.ts#L20-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a9408f49b7..926ed0ebd2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package routingstate package routingstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L408-L429 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3c3b589dbb..900cf17a9d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package ruleaction package ruleaction import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Rule.ts#L41-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d485a916bd..8a43688824 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package runtimefieldtype package runtimefieldtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/RuntimeFields.ts#L62-L73 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bbd458b3e4..ee0b1aad58 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package sampleraggregationexecutionhint package sampleraggregationexecutionhint import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L359-L372 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 009be497c1..dbcfd2b597 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package scoremode package scoremode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/rescoring.ts#L64-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..796f7ed4a0 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package scorenormalizer +package scorenormalizer + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2b0bac1071..d5e6327931 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package scriptlanguage package scriptlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Scripting.ts#L25-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Scripting.ts#L25-L46 type ScriptLanguage struct { Name string } diff --git a/typedapi/types/enums/scriptsorttype/scriptsorttype.go b/typedapi/types/enums/scriptsorttype/scriptsorttype.go index 05b68b9373..1535ec0a22 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package scriptsorttype package scriptsorttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/sort.ts#L80-L84 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 92b5c2c99c..97d2d7ddd3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package searchtype package searchtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L272-L277 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L274-L279 type SearchType struct { Name string } diff --git a/typedapi/types/enums/segmentsortmissing/segmentsortmissing.go b/typedapi/types/enums/segmentsortmissing/segmentsortmissing.go index 6e263fc89a..3935279f16 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package segmentsortmissing package segmentsortmissing import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSegmentSort.ts#L43-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8f8e3013cd..4cda7d77af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package segmentsortmode package segmentsortmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSegmentSort.ts#L36-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 928eb6e0c3..d03d7d1b99 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package segmentsortorder package segmentsortorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSegmentSort.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9f6f153af2..c1775db194 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package shapetype package shapetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1492-L1495 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1492-L1495 type ShapeType struct { Name string } diff --git a/typedapi/types/enums/shardroutingstate/shardroutingstate.go b/typedapi/types/enums/shardroutingstate/shardroutingstate.go index 362a6bb95b..1b77580266 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package shardroutingstate package shardroutingstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L169-L174 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9bec3eb2f9..fc78fc0546 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package shardsstatsstage package shardsstatsstage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotShardsStatsStage.ts#L20-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..31b044e9b9 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package shardstate +package shardstate + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8a6125dc01..f4c43cd762 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package shardstoreallocation package shardstoreallocation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/shard_stores/types.ts#L47-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 21bf5daa2d..6dfffea91e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package shardstorestatus package shardstorestatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/shard_stores/types.ts#L62-L71 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fc444220e9..691b4a61ed 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package shutdownstatus package shutdownstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L45-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d1ff28ba2f..389f3cca2f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package shutdowntype package shutdowntype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d28809eda5..85a9fa442c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package simplequerystringflag package simplequerystringflag import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L729-L784 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 85afed021a..8729b1fbb5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package slicescalculation package slicescalculation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L368-L376 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L370-L378 type SlicesCalculation struct { Name string } diff --git a/typedapi/types/enums/snapshotsort/snapshotsort.go b/typedapi/types/enums/snapshotsort/snapshotsort.go index 8cc6bd1c06..9043b64b30 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package snapshotsort package snapshotsort import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotInfo.ts#L73-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotInfo.ts#L73-L93 type SnapshotSort struct { Name string } diff --git a/typedapi/types/enums/snapshotstate/snapshotstate.go b/typedapi/types/enums/snapshotstate/snapshotstate.go new file mode 100644 index 0000000000..82c5e3c8e4 --- /dev/null +++ b/typedapi/types/enums/snapshotstate/snapshotstate.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/907d11a72a6bfd37b777d526880c56202889609e + +// Package snapshotstate +package snapshotstate + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotState.ts#L20-L31 +type SnapshotState struct { + Name string +} + +var ( + INPROGRESS = SnapshotState{"IN_PROGRESS"} + + SUCCESS = SnapshotState{"SUCCESS"} + + FAILED = SnapshotState{"FAILED"} + + PARTIAL = SnapshotState{"PARTIAL"} + + INCOMPATIBLE = SnapshotState{"INCOMPATIBLE"} +) + +func (s SnapshotState) MarshalText() (text []byte, err error) { + return []byte(s.String()), nil +} + +func (s *SnapshotState) UnmarshalText(text []byte) error { + switch strings.ReplaceAll(strings.ToLower(string(text)), "\"", "") { + + case "in_progress": + *s = INPROGRESS + case "success": + *s = SUCCESS + case "failed": + *s = FAILED + case "partial": + *s = PARTIAL + case "incompatible": + *s = INCOMPATIBLE + default: + *s = SnapshotState{string(text)} + } + + return nil +} + +func (s SnapshotState) String() string { + return s.Name +} diff --git a/typedapi/types/enums/snapshotupgradestate/snapshotupgradestate.go b/typedapi/types/enums/snapshotupgradestate/snapshotupgradestate.go index 339cd7efc7..ee206038d9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package snapshotupgradestate package snapshotupgradestate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Model.ts#L95-L100 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 21d3b8a348..a6b0760a7b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package snowballlanguage package snowballlanguage import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/languages.ts#L20-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 179e673e5d..0e2b04a8cc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package sortmode package sortmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/sort.ts#L108-L117 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 524db69815..bb338cf4d0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package sortorder package sortorder import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/sort.ts#L119-L128 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5531d1cd72..a6645db74c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package sourcefieldmode package sourcefieldmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/meta-fields.ts#L67-L75 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8689395d00..32b3cbe02a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package sourcemode package sourcemode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L509-L513 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L522-L526 type SourceMode struct { Name string } diff --git a/typedapi/types/enums/sqlformat/sqlformat.go b/typedapi/types/enums/sqlformat/sqlformat.go index 32db295df4..404c65c4ab 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package sqlformat package sqlformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/sql/query/QuerySqlRequest.ts#L154-L162 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ed890b25b5..95b24a3280 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package statslevel package statslevel import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/searchable_snapshots/_types/stats.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..dc680135ec --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package stopwordlanguage +package stopwordlanguage + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 46eff90cea..f2240ebeee 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package storagetype package storagetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L545-L573 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L560-L588 type StorageType struct { Name string } diff --git a/typedapi/types/enums/stringdistance/stringdistance.go b/typedapi/types/enums/stringdistance/stringdistance.go index 1dd11cbac9..88d5dcf1f8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package stringdistance package stringdistance import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L473-L494 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L473-L494 type StringDistance struct { Name string } diff --git a/typedapi/types/enums/subobjects/subobjects.go b/typedapi/types/enums/subobjects/subobjects.go index 7d5112b09f..d1395a9459 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package subobjects package subobjects import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/TypeMapping.ts#L63-L74 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e4c45df54f..d39d7bcfa9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package suggestmode package suggestmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L279-L292 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L281-L294 type SuggestMode struct { Name string } diff --git a/typedapi/types/enums/suggestsort/suggestsort.go b/typedapi/types/enums/suggestsort/suggestsort.go index 1c5f179cb2..06533855ff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package suggestsort package suggestsort import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L496-L505 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L496-L505 type SuggestSort struct { Name string } diff --git a/typedapi/types/enums/syncjobtriggermethod/syncjobtriggermethod.go b/typedapi/types/enums/syncjobtriggermethod/syncjobtriggermethod.go index 80f45ab310..01471a0755 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package syncjobtriggermethod package syncjobtriggermethod import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/SyncJob.ts#L48-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5885bbf9f6..9260322a0f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package syncjobtype package syncjobtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/SyncJob.ts#L42-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0696ccf948..53b4d83c74 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package syncstatus package syncstatus import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L138-L146 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ec54dfac53..af44dcdbdb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package synonymformat package synonymformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L104-L107 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c5d78921a2..e805ade3c6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package syntheticsourcekeepenum package syntheticsourcekeepenum import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/Property.ts#L99-L117 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f3a1c03372..b51369653e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package tasktype package tasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/TaskType.ts#L20-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..04924279e2 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypealibabacloudai +package tasktypealibabacloudai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..25d41c1de4 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypeamazonbedrock +package tasktypeamazonbedrock + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..5140a3c704 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypeamazonsagemaker +package tasktypeamazonsagemaker + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..89d6f1e41a --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypeanthropic +package tasktypeanthropic + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..64e99d4a8c --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypeazureaistudio +package tasktypeazureaistudio + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..f4ee2407dd --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypeazureopenai +package tasktypeazureopenai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..1bde1ba1ef --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypecohere +package tasktypecohere + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..1c7eef5832 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypecustom +package tasktypecustom + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..fc7ac13b25 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypedeepseek +package tasktypedeepseek + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..eee49fca3f --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypeelasticsearch +package tasktypeelasticsearch + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..b9f1f486bb --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypeelser +package tasktypeelser + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..1dd000d4c6 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypegoogleaistudio +package tasktypegoogleaistudio + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..fad86448ab --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypegooglevertexai +package tasktypegooglevertexai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..4bfb2970ce --- /dev/null +++ b/typedapi/types/enums/tasktypehuggingface/tasktypehuggingface.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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypehuggingface +package tasktypehuggingface + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L108-L113 +type TaskTypeHuggingFace struct { + Name string +} + +var ( + Chatcompletion = TaskTypeHuggingFace{"chat_completion"} + + Completion = TaskTypeHuggingFace{"completion"} + + Rerank = TaskTypeHuggingFace{"rerank"} + + 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 "chat_completion": + *t = Chatcompletion + case "completion": + *t = Completion + case "rerank": + *t = Rerank + 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..2e604bee33 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypejinaai +package tasktypejinaai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..2fd0c0afb6 --- /dev/null +++ b/typedapi/types/enums/tasktypemistral/tasktypemistral.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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypemistral +package tasktypemistral + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L115-L119 +type TaskTypeMistral struct { + Name string +} + +var ( + Textembedding = TaskTypeMistral{"text_embedding"} + + Chatcompletion = TaskTypeMistral{"chat_completion"} + + Completion = TaskTypeMistral{"completion"} +) + +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 + case "chat_completion": + *t = Chatcompletion + case "completion": + *t = Completion + 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..fcd007ef96 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypeopenai +package tasktypeopenai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L121-L125 +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..701c828c43 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypevoyageai +package tasktypevoyageai + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L127-L130 +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..fce9b57de2 --- /dev/null +++ b/typedapi/types/enums/tasktypewatsonx/tasktypewatsonx.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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tasktypewatsonx +package tasktypewatsonx + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/TaskType.ts#L132-L136 +type TaskTypeWatsonx struct { + Name string +} + +var ( + Textembedding = TaskTypeWatsonx{"text_embedding"} + + Chatcompletion = TaskTypeWatsonx{"chat_completion"} + + Completion = TaskTypeWatsonx{"completion"} +) + +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 + case "chat_completion": + *t = Chatcompletion + case "completion": + *t = Completion + 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..096bbbc2ba --- /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/907d11a72a6bfd37b777d526880c56202889609e + +// Package tdigestexecutionhint +package tdigestexecutionhint + +import "strings" + +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2cb2c0f104..27b756d669 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package templateformat package templateformat import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/RoleTemplate.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b38e5eff42..942ed5a3b3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package termsaggregationcollectmode package termsaggregationcollectmode import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1056-L1065 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4519e9ee6d..c1e11d6fdf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package termsaggregationexecutionhint package termsaggregationexecutionhint import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1067-L1072 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 58e065dca3..b1cb53e1a8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package termvectoroption package termvectoroption import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/TermVectorOption.ts#L20-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bbb71dbeeb..16fd599eb8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package textquerytype package textquerytype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L559-L585 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8eb20c3bbf..f43112ac35 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package threadtype package threadtype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L294-L300 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L296-L302 type ThreadType struct { Name string } diff --git a/typedapi/types/enums/timeseriesmetrictype/timeseriesmetrictype.go b/typedapi/types/enums/timeseriesmetrictype/timeseriesmetrictype.go index c0a860a5fd..282c29b787 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package timeseriesmetrictype package timeseriesmetrictype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/TimeSeriesMetricType.ts#L20-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cc1727972b..a2ec6e2229 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package timeunit package timeunit import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Time.ts#L69-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 11cd4579a7..5eebf63db5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package tokenchar package tokenchar import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L59-L66 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c8df21ac6d..513803917b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package tokenizationtruncate package tokenizationtruncate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L369-L373 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 713f07a378..24270db128 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package totalhitsrelation package totalhitsrelation import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/hits.ts#L100-L105 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L100-L105 type TotalHitsRelation struct { Name string } diff --git a/typedapi/types/enums/trainedmodeltype/trainedmodeltype.go b/typedapi/types/enums/trainedmodeltype/trainedmodeltype.go index d519f42fe6..54142c4b07 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package trainedmodeltype package trainedmodeltype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L315-L329 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 edf5ad3504..479c21fadd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package trainingpriority package trainingpriority import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L365-L368 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eab9d6bfa3..99b5944e25 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package translogdurability package translogdurability import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L379-L394 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L392-L407 type TranslogDurability struct { Name string } diff --git a/typedapi/types/enums/ttesttype/ttesttype.go b/typedapi/types/enums/ttesttype/ttesttype.go index e66f6b277c..8dd77eff3e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package ttesttype package ttesttype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L331-L344 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 38b7e36527..dcd6f54673 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package type_ package type_ import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/shutdown/_types/types.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dedc49aaf0..e53936aa6e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package unassignedinformationreason package unassignedinformationreason import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/types.ts#L138-L157 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1117547035..0bc73350c7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package useragentproperty package useragentproperty import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L548-L554 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L548-L554 type UserAgentProperty struct { Name string } diff --git a/typedapi/types/enums/valuetype/valuetype.go b/typedapi/types/enums/valuetype/valuetype.go index 31d09e9519..304e5ef2ad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package valuetype package valuetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L436-L447 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cf3fe39d61..e68f1678c3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package versiontype package versiontype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L100-L119 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L100-L119 type VersionType struct { Name string } diff --git a/typedapi/types/enums/voyageaiservicetype/voyageaiservicetype.go b/typedapi/types/enums/voyageaiservicetype/voyageaiservicetype.go index 7584444a68..e7ac906d3c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package voyageaiservicetype package voyageaiservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1139-L1141 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ed963f02f7..7299307a2e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package voyageaitasktype package voyageaitasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1134-L1137 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6a96df952e..cb0dbd9732 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package waitforactiveshardoptions package waitforactiveshardoptions import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L302-L306 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L304-L308 type WaitForActiveShardOptions struct { Name string } diff --git a/typedapi/types/enums/waitforevents/waitforevents.go b/typedapi/types/enums/waitforevents/waitforevents.go index c50017e4e5..428ad0b12f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package waitforevents package waitforevents import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L308-L315 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L310-L317 type WaitForEvents struct { Name string } diff --git a/typedapi/types/enums/watchermetric/watchermetric.go b/typedapi/types/enums/watchermetric/watchermetric.go index c963d630f2..3742c41a18 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package watchermetric package watchermetric import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/stats/types.ts#L63-L69 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1eb1ec5f12..97bcdfa30a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package watcherstate package watcherstate import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/stats/types.ts#L26-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e5057f746a..a36260716d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package watsonxservicetype package watsonxservicetype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1186-L1188 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1730-L1732 type WatsonxServiceType struct { Name string } diff --git a/typedapi/types/enums/watsonxtasktype/watsonxtasktype.go b/typedapi/types/enums/watsonxtasktype/watsonxtasktype.go index 0e6569186b..7e0b63d9fc 100644 --- a/typedapi/types/enums/watsonxtasktype/watsonxtasktype.go +++ b/typedapi/types/enums/watsonxtasktype/watsonxtasktype.go @@ -16,20 +16,24 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package watsonxtasktype package watsonxtasktype import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1182-L1184 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1724-L1728 type WatsonxTaskType struct { Name string } var ( Textembedding = WatsonxTaskType{"text_embedding"} + + Chatcompletion = WatsonxTaskType{"chat_completion"} + + Completion = WatsonxTaskType{"completion"} ) func (w WatsonxTaskType) MarshalText() (text []byte, err error) { @@ -41,6 +45,10 @@ func (w *WatsonxTaskType) UnmarshalText(text []byte) error { case "text_embedding": *w = Textembedding + case "chat_completion": + *w = Chatcompletion + case "completion": + *w = Completion default: *w = WatsonxTaskType{string(text)} } diff --git a/typedapi/types/enums/xpackcategory/xpackcategory.go b/typedapi/types/enums/xpackcategory/xpackcategory.go index 782160a9d2..52ad31117c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package xpackcategory package xpackcategory import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/info/XPackInfoRequest.ts#L58-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 34bb42a9f2..1780738be7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Package zerotermsquery package zerotermsquery import "strings" -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L587-L596 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 040aa5a033..b7cbef9d46 100644 --- a/typedapi/types/epochtimeunitmillis.go +++ b/typedapi/types/epochtimeunitmillis.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // EpochTimeUnitMillis type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Time.ts#L40-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L40-L40 type EpochTimeUnitMillis int64 type EpochTimeUnitMillisVariant interface { diff --git a/typedapi/types/epochtimeunitseconds.go b/typedapi/types/epochtimeunitseconds.go index 6a9201b1cb..d07a552e84 100644 --- a/typedapi/types/epochtimeunitseconds.go +++ b/typedapi/types/epochtimeunitseconds.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // EpochTimeUnitSeconds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Time.ts#L40-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Time.ts#L40-L40 type EpochTimeUnitSeconds int64 type EpochTimeUnitSecondsVariant interface { diff --git a/typedapi/types/eql.go b/typedapi/types/eql.go index 42b166d0af..23604bafc9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Eql type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L361-L364 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0d3e0e492f..13d95535b3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // EqlFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L96-L104 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9e45e2542d..ba9f867ded 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // EqlFeaturesJoin type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L106-L112 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5dae72dead..23b216693c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // EqlFeaturesKeys type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L114-L120 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3cc9edbbdb..0b358de461 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // EqlFeaturesPipes type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L122-L125 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6e733c06fa..2065603714 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // EqlFeaturesSequences type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L127-L134 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 49415f1d2d..7218932e52 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // EqlHits type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/eql/_types/EqlHits.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1752fdaa3a..4d35fb350f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ErrorCause type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Errors.ts#L25-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1d6dbc9ff6..a0c61f071f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ErrorResponseBase type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Base.ts#L127-L136 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 index 2e25e6a029..7240f2bc65 100644 --- a/typedapi/types/esqlclusterdetails.go +++ b/typedapi/types/esqlclusterdetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,12 +33,13 @@ import ( // EsqlClusterDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/_types/EsqlResult.ts#L65-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/EsqlResult.ts#L75-L81 type EsqlClusterDetails struct { - Indices string `json:"indices"` - Shards_ *EsqlShardInfo `json:"_shards,omitempty"` - Status esqlclusterstatus.EsqlClusterStatus `json:"status"` - Took *int64 `json:"took,omitempty"` + Failures []EsqlShardFailure `json:"failures,omitempty"` + 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 { @@ -56,6 +57,11 @@ func (s *EsqlClusterDetails) UnmarshalJSON(data []byte) error { switch t { + case "failures": + if err := dec.Decode(&s.Failures); err != nil { + return fmt.Errorf("%s | %w", "Failures", err) + } + case "indices": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { @@ -94,5 +100,3 @@ func NewEsqlClusterDetails() *EsqlClusterDetails { return r } - -// false diff --git a/typedapi/types/esqlclusterinfo.go b/typedapi/types/esqlclusterinfo.go index 837d781a24..88bc269d25 100644 --- a/typedapi/types/esqlclusterinfo.go +++ b/typedapi/types/esqlclusterinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // EsqlClusterInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/_types/EsqlResult.ts#L55-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/EsqlResult.ts#L65-L73 type EsqlClusterInfo struct { Details map[string]EsqlClusterDetails `json:"details"` Failed int `json:"failed"` @@ -174,5 +174,3 @@ func NewEsqlClusterInfo() *EsqlClusterInfo { return r } - -// false diff --git a/typedapi/types/esqlcolumninfo.go b/typedapi/types/esqlcolumninfo.go index 2096fb777a..55bd8159fe 100644 --- a/typedapi/types/esqlcolumninfo.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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // EsqlColumnInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/_types/EsqlResult.ts#L50-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/EsqlResult.ts#L60-L63 type EsqlColumnInfo struct { Name string `json:"name"` Type string `json:"type"` @@ -87,5 +87,3 @@ func NewEsqlColumnInfo() *EsqlColumnInfo { return r } - -// false diff --git a/typedapi/types/esqlshardfailure.go b/typedapi/types/esqlshardfailure.go index 8da5273f9e..c947d9439c 100644 --- a/typedapi/types/esqlshardfailure.go +++ b/typedapi/types/esqlshardfailure.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,16 +26,17 @@ import ( "errors" "fmt" "io" + "strconv" ) // EsqlShardFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/_types/EsqlResult.ts#L88-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/EsqlResult.ts#L98-L103 type EsqlShardFailure struct { - Index string `json:"index"` + Index *string `json:"index,omitempty"` Node *string `json:"node,omitempty"` Reason ErrorCause `json:"reason"` - Shard string `json:"shard"` + Shard int `json:"shard"` } func (s *EsqlShardFailure) UnmarshalJSON(data []byte) error { @@ -69,8 +70,19 @@ func (s *EsqlShardFailure) UnmarshalJSON(data []byte) error { } case "shard": - if err := dec.Decode(&s.Shard); err != nil { - return fmt.Errorf("%s | %w", "Shard", 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", "Shard", err) + } + s.Shard = value + case float64: + f := int(v) + s.Shard = f } } @@ -84,5 +96,3 @@ func NewEsqlShardFailure() *EsqlShardFailure { return r } - -// false diff --git a/typedapi/types/esqlshardinfo.go b/typedapi/types/esqlshardinfo.go index 67ee3dbe66..3be916b3f4 100644 --- a/typedapi/types/esqlshardinfo.go +++ b/typedapi/types/esqlshardinfo.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,13 +31,12 @@ import ( // EsqlShardInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/_types/EsqlResult.ts#L80-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/EsqlResult.ts#L91-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"` + Failed *int `json:"failed,omitempty"` + Skipped *int `json:"skipped,omitempty"` + Successful *int `json:"successful,omitempty"` + Total int `json:"total"` } func (s *EsqlShardInfo) UnmarshalJSON(data []byte) error { @@ -71,11 +70,6 @@ func (s *EsqlShardInfo) UnmarshalJSON(data []byte) error { 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 @@ -135,5 +129,3 @@ func NewEsqlShardInfo() *EsqlShardInfo { return r } - -// false diff --git a/typedapi/types/estoniananalyzer.go b/typedapi/types/estoniananalyzer.go index 820c0931d7..07880f6f53 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,11 @@ import ( // EstonianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L159-L163 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L159-L163 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": @@ -112,8 +101,6 @@ func NewEstonianAnalyzer() *EstonianAnalyzer { return r } -// true - type EstonianAnalyzerVariant interface { EstonianAnalyzerCaster() *EstonianAnalyzer } @@ -121,3 +108,8 @@ type EstonianAnalyzerVariant interface { func (s *EstonianAnalyzer) EstonianAnalyzerCaster() *EstonianAnalyzer { return s } + +func (s *EstonianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/eventdatastream.go b/typedapi/types/eventdatastream.go index b7ceb5d7e0..8c8eae031b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // EventDataStream type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/_types/BehavioralAnalytics.ts#L29-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fc9d1d28d2..b784e487fc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // EwmaModelSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L293-L295 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L293-L295 type EwmaModelSettings struct { Alpha *float32 `json:"alpha,omitempty"` } @@ -79,8 +79,6 @@ func NewEwmaModelSettings() *EwmaModelSettings { return r } -// true - type EwmaModelSettingsVariant interface { EwmaModelSettingsCaster() *EwmaModelSettings } diff --git a/typedapi/types/ewmamovingaverageaggregation.go b/typedapi/types/ewmamovingaverageaggregation.go index 7455efcf6b..14514100b0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // EwmaMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L278-L281 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -174,8 +174,6 @@ func NewEwmaMovingAverageAggregation() *EwmaMovingAverageAggregation { return r } -// true - type EwmaMovingAverageAggregationVariant interface { EwmaMovingAverageAggregationCaster() *EwmaMovingAverageAggregation } @@ -183,3 +181,8 @@ type EwmaMovingAverageAggregationVariant interface { func (s *EwmaMovingAverageAggregation) EwmaMovingAverageAggregationCaster() *EwmaMovingAverageAggregation { return s } + +func (s *EwmaMovingAverageAggregation) MovingAverageAggregationCaster() *MovingAverageAggregation { + o := MovingAverageAggregation(s) + return &o +} diff --git a/typedapi/types/executeenrichpolicystatus.go b/typedapi/types/executeenrichpolicystatus.go index 2e8d090a8b..d29331ac94 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ExecuteEnrichPolicyStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/execute_policy/types.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7233c2e510..11062fa980 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ExecutingPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/stats/types.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 46f8e3d40a..e40b8c8814 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ExecutionResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Execution.ts#L60-L66 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2acfb38b66..3c6a3df197 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // ExecutionResultAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Execution.ts#L74-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4fff404ef6..9dd570df35 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // ExecutionResultCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Execution.ts#L68-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 27ef01299b..d240c059f3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,7 +29,7 @@ import ( // ExecutionResultInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Execution.ts#L88-L92 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d8b3b71389..ae4f862d87 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ExecutionState type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Action.ts#L114-L118 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L114-L118 type ExecutionState struct { Reason *string `json:"reason,omitempty"` Successful bool `json:"successful"` @@ -96,8 +96,6 @@ func NewExecutionState() *ExecutionState { return r } -// true - type ExecutionStateVariant interface { ExecutionStateCaster() *ExecutionState } diff --git a/typedapi/types/executionthreadpool.go b/typedapi/types/executionthreadpool.go index 19e7d242cd..e0ad400a7d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ExecutionThreadPool type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Execution.ts#L94-L103 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9da20072b5..b3b53baa41 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ExistsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L38-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -104,8 +104,6 @@ func NewExistsQuery() *ExistsQuery { return r } -// true - type ExistsQueryVariant interface { ExistsQueryCaster() *ExistsQuery } diff --git a/typedapi/types/expandwildcards.go b/typedapi/types/expandwildcards.go index 63c32d805e..15031e26fb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // ExpandWildcards type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L214-L214 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L214-L214 type ExpandWildcards []expandwildcard.ExpandWildcard type ExpandWildcardsVariant interface { diff --git a/typedapi/types/explainanalyzetoken.go b/typedapi/types/explainanalyzetoken.go index 37e642f044..3d66ed5444 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ExplainAnalyzeToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/analyze/types.ts#L52-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e19aa00c39..b855b0be88 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Explanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/explain/types.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 19c9bcb127..064bcbf561 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ExplanationDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/explain/types.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f2a950a990..6cde59baa8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ExploreControls type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/graph/_types/ExploreControls.ts#L24-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -124,8 +124,6 @@ func NewExploreControls() *ExploreControls { return r } -// true - type ExploreControlsVariant interface { ExploreControlsCaster() *ExploreControls } diff --git a/typedapi/types/exponentialaveragecalculationcontext.go b/typedapi/types/exponentialaveragecalculationcontext.go index 039fb8fe32..d1317d39a5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ExponentialAverageCalculationContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Datafeed.ts#L204-L208 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 98dacc51a4..fb30749289 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ExtendedBoundsdouble type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L508-L517 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L508-L517 type ExtendedBoundsdouble struct { // Max Maximum value for the bound. Max *Float64 `json:"max,omitempty"` @@ -98,8 +98,6 @@ func NewExtendedBoundsdouble() *ExtendedBoundsdouble { return r } -// true - type ExtendedBoundsdoubleVariant interface { ExtendedBoundsdoubleCaster() *ExtendedBoundsdouble } diff --git a/typedapi/types/extendedboundsfielddatemath.go b/typedapi/types/extendedboundsfielddatemath.go index 9da79f571b..3cc1897017 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ExtendedBoundsFieldDateMath type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L508-L517 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L508-L517 type ExtendedBoundsFieldDateMath struct { // Max Maximum value for the bound. Max FieldDateMath `json:"max,omitempty"` @@ -75,8 +75,6 @@ func NewExtendedBoundsFieldDateMath() *ExtendedBoundsFieldDateMath { return r } -// true - type ExtendedBoundsFieldDateMathVariant interface { ExtendedBoundsFieldDateMathCaster() *ExtendedBoundsFieldDateMath } diff --git a/typedapi/types/extendedmemorystats.go b/typedapi/types/extendedmemorystats.go index bb71413a6b..43a9ec6fb4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ExtendedMemoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L658-L667 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 30c51d036c..e8a52ef348 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ExtendedStatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L299-L320 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 44d7ae70dd..93b4d254fa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ExtendedStatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L101-L106 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L107-L112 type ExtendedStatsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -114,8 +114,6 @@ func NewExtendedStatsAggregation() *ExtendedStatsAggregation { return r } -// true - type ExtendedStatsAggregationVariant interface { ExtendedStatsAggregationCaster() *ExtendedStatsAggregation } diff --git a/typedapi/types/extendedstatsbucketaggregate.go b/typedapi/types/extendedstatsbucketaggregate.go index ca35afbe9c..29a0d581b2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ExtendedStatsBucketAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L322-L323 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d3fd16de69..8a9eb7be25 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ExtendedStatsBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L218-L223 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -112,8 +112,6 @@ func NewExtendedStatsBucketAggregation() *ExtendedStatsBucketAggregation { return r } -// true - type ExtendedStatsBucketAggregationVariant interface { ExtendedStatsBucketAggregationCaster() *ExtendedStatsBucketAggregation } diff --git a/typedapi/types/failprocessor.go b/typedapi/types/failprocessor.go index 00ae87e657..94b93c65b7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FailProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L889-L895 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L889-L895 type FailProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -137,8 +137,6 @@ func NewFailProcessor() *FailProcessor { return r } -// true - type FailProcessorVariant interface { FailProcessorCaster() *FailProcessor } diff --git a/typedapi/types/failurestore.go b/typedapi/types/failurestore.go index 71dc39f7ca..c876a904ed 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FailureStore type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/DataStream.ts#L47-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStream.ts#L48-L52 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/failurestorelifecycle.go b/typedapi/types/failurestorelifecycle.go new file mode 100644 index 0000000000..db662df4ec --- /dev/null +++ b/typedapi/types/failurestorelifecycle.go @@ -0,0 +1,99 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// FailureStoreLifecycle type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamFailureStore.ts#L56-L72 +type FailureStoreLifecycle struct { + // 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. + DataRetention Duration `json:"data_retention,omitempty"` + // 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. + Enabled *bool `json:"enabled,omitempty"` +} + +func (s *FailureStoreLifecycle) 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 "data_retention": + if err := dec.Decode(&s.DataRetention); err != nil { + return fmt.Errorf("%s | %w", "DataRetention", err) + } + + case "enabled": + 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", "Enabled", err) + } + s.Enabled = &value + case bool: + s.Enabled = &v + } + + } + } + return nil +} + +// NewFailureStoreLifecycle returns a FailureStoreLifecycle. +func NewFailureStoreLifecycle() *FailureStoreLifecycle { + r := &FailureStoreLifecycle{} + + return r +} + +type FailureStoreLifecycleVariant interface { + FailureStoreLifecycleCaster() *FailureStoreLifecycle +} + +func (s *FailureStoreLifecycle) FailureStoreLifecycleCaster() *FailureStoreLifecycle { + return s +} diff --git a/typedapi/types/failurestorelifecycletemplate.go b/typedapi/types/failurestorelifecycletemplate.go new file mode 100644 index 0000000000..6870d9ea35 --- /dev/null +++ b/typedapi/types/failurestorelifecycletemplate.go @@ -0,0 +1,99 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// FailureStoreLifecycleTemplate type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/DataStreamFailureStore.ts#L74-L90 +type FailureStoreLifecycleTemplate struct { + // 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. + DataRetention Duration `json:"data_retention,omitempty"` + // 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. + Enabled *bool `json:"enabled,omitempty"` +} + +func (s *FailureStoreLifecycleTemplate) 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 "data_retention": + if err := dec.Decode(&s.DataRetention); err != nil { + return fmt.Errorf("%s | %w", "DataRetention", err) + } + + case "enabled": + 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", "Enabled", err) + } + s.Enabled = &value + case bool: + s.Enabled = &v + } + + } + } + return nil +} + +// NewFailureStoreLifecycleTemplate returns a FailureStoreLifecycleTemplate. +func NewFailureStoreLifecycleTemplate() *FailureStoreLifecycleTemplate { + r := &FailureStoreLifecycleTemplate{} + + return r +} + +type FailureStoreLifecycleTemplateVariant interface { + FailureStoreLifecycleTemplateCaster() *FailureStoreLifecycleTemplate +} + +func (s *FailureStoreLifecycleTemplate) FailureStoreLifecycleTemplateCaster() *FailureStoreLifecycleTemplate { + return s +} diff --git a/typedapi/types/feature.go b/typedapi/types/feature.go index cd9d80b862..b66548d3e1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Feature type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/features/_types/Feature.ts#L20-L23 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d05f5ab493..09eda510af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FeatureEnabled type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L215-L217 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L215-L217 type FeatureEnabled struct { Enabled bool `json:"enabled"` } @@ -77,8 +77,6 @@ func NewFeatureEnabled() *FeatureEnabled { return r } -// true - type FeatureEnabledVariant interface { FeatureEnabledCaster() *FeatureEnabled } diff --git a/typedapi/types/featureextractor.go b/typedapi/types/featureextractor.go index 280c3c5f12..5b9e66ee2b 100644 --- a/typedapi/types/featureextractor.go +++ b/typedapi/types/featureextractor.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // FeatureExtractor type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L93-L96 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L93-L96 type FeatureExtractor QueryFeatureExtractor type FeatureExtractorVariant interface { diff --git a/typedapi/types/features.go b/typedapi/types/features.go index 3e0765ffa3..404d4fccc3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,5 +26,5 @@ import ( // Features type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get/IndicesGetRequest.ts#L103-L103 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/get/IndicesGetRequest.ts#L103-L103 type Features []feature.Feature diff --git a/typedapi/types/featuretoggle.go b/typedapi/types/featuretoggle.go index 1b9940854b..0755b04f70 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FeatureToggle type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L37-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c76025f89a..4936693b60 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FetchProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L230-L237 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ee76bb80bb..6fbc886ffb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FetchProfileBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L239-L248 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 98007c4dcf..fdde6c0a2b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FetchProfileDebug type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L250-L253 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3f01018c5a..2317ed5d24 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // FieldAliasProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/specialized.ts#L64-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -803,8 +815,6 @@ func NewFieldAliasProperty() *FieldAliasProperty { return r } -// true - type FieldAliasPropertyVariant interface { FieldAliasPropertyCaster() *FieldAliasProperty } @@ -812,3 +822,8 @@ type FieldAliasPropertyVariant interface { func (s *FieldAliasProperty) FieldAliasPropertyCaster() *FieldAliasProperty { return s } + +func (s *FieldAliasProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/fieldandformat.go b/typedapi/types/fieldandformat.go index 99c244593d..495f82658a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FieldAndFormat type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/abstractions.ts#L535-L549 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -111,8 +111,6 @@ func NewFieldAndFormat() *FieldAndFormat { return r } -// true - type FieldAndFormatVariant interface { FieldAndFormatCaster() *FieldAndFormat } diff --git a/typedapi/types/fieldcapability.go b/typedapi/types/fieldcapability.go index b99d6fccee..51de8b0df2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // FieldCapability type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/field_caps/types.ts#L23-L81 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e7555d3bc4..2a79529cbe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FieldCollapse type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/FieldCollapse.ts#L24-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -112,8 +112,6 @@ func NewFieldCollapse() *FieldCollapse { return r } -// true - type FieldCollapseVariant interface { FieldCollapseCaster() *FieldCollapse } diff --git a/typedapi/types/fielddatafrequencyfilter.go b/typedapi/types/fielddatafrequencyfilter.go index 1be877a94c..215d8cb530 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FielddataFrequencyFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/FielddataFrequencyFilter.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/FielddataFrequencyFilter.ts#L22-L26 type FielddataFrequencyFilter struct { Max Float64 `json:"max"` Min Float64 `json:"min"` @@ -113,8 +113,6 @@ func NewFielddataFrequencyFilter() *FielddataFrequencyFilter { return r } -// true - type FielddataFrequencyFilterVariant interface { FielddataFrequencyFilterCaster() *FielddataFrequencyFilter } diff --git a/typedapi/types/fielddatarecord.go b/typedapi/types/fielddatarecord.go index 38da8c1287..7eefd59e21 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FielddataRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/fielddata/types.ts#L20-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ba990d76fd..c7cdc4cbf4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,10 +31,11 @@ import ( // FielddataStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L114-L119 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8fb9b7be5b..e993d2c42d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // Float64 // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L309-L316 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L309-L316 type FieldDateMath any type FieldDateMathVariant interface { diff --git a/typedapi/types/fieldlookup.go b/typedapi/types/fieldlookup.go index c10ee0bfcc..0f0276638d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // FieldLookup type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/abstractions.ts#L436-L453 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/abstractions.ts#L436-L453 type FieldLookup struct { // Id `id` of the document. Id string `json:"id"` @@ -89,8 +89,6 @@ func NewFieldLookup() *FieldLookup { return r } -// true - type FieldLookupVariant interface { FieldLookupCaster() *FieldLookup } diff --git a/typedapi/types/fieldmapping.go b/typedapi/types/fieldmapping.go index acd6b9bfce..718039ed94 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FieldMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/meta-fields.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a60af32a7e..e2405e302b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FieldMemoryUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L121-L124 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 52ada846f2..43aa2830a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // FieldMetric type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/_types/Metric.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -78,8 +78,6 @@ func NewFieldMetric() *FieldMetric { return r } -// true - type FieldMetricVariant interface { FieldMetricCaster() *FieldMetric } diff --git a/typedapi/types/fieldnamesfield.go b/typedapi/types/fieldnamesfield.go index f432280b5f..8ebe443ef8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FieldNamesField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/meta-fields.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L42-L44 type FieldNamesField struct { Enabled bool `json:"enabled"` } @@ -77,8 +77,6 @@ func NewFieldNamesField() *FieldNamesField { return r } -// true - type FieldNamesFieldVariant interface { FieldNamesFieldCaster() *FieldNamesField } diff --git a/typedapi/types/fields.go b/typedapi/types/fields.go index 1a2391fd66..30d52b1cf8 100644 --- a/typedapi/types/fields.go +++ b/typedapi/types/fields.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Fields type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L137-L137 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L137-L137 type Fields []string type FieldsVariant interface { diff --git a/typedapi/types/fieldsecurity.go b/typedapi/types/fieldsecurity.go index 92323b9d22..b4374efb85 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // FieldSecurity type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/FieldSecurity.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/FieldSecurity.ts#L22-L25 type FieldSecurity struct { Except []string `json:"except,omitempty"` Grant []string `json:"grant,omitempty"` @@ -95,8 +95,6 @@ func NewFieldSecurity() *FieldSecurity { return r } -// true - type FieldSecurityVariant interface { FieldSecurityCaster() *FieldSecurity } diff --git a/typedapi/types/fieldsizeusage.go b/typedapi/types/fieldsizeusage.go index 4ef5408a0a..133c82c5f7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FieldSizeUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L95-L98 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 70c23dcbdf..f526e67416 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // FieldSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/sort.ts#L43-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L43-L52 type FieldSort struct { Format *string `json:"format,omitempty"` Missing Missing `json:"missing,omitempty"` @@ -121,8 +121,6 @@ func NewFieldSort() *FieldSort { return r } -// true - type FieldSortVariant interface { FieldSortCaster() *FieldSort } diff --git a/typedapi/types/fieldstat.go b/typedapi/types/fieldstat.go index f1109c2884..702ee494af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FieldStat type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/_types/Structure.ts#L23-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 54500c8c85..a64100f032 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FieldStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/termvectors/types.ts#L28-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 01c728250d..0eb4976574 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FieldSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L110-L143 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L110-L143 type FieldSuggester struct { AdditionalFieldSuggesterProperty map[string]json.RawMessage `json:"-"` // Completion Provides auto-complete/search-as-you-type functionality. @@ -172,8 +172,6 @@ func NewFieldSuggester() *FieldSuggester { return r } -// true - type FieldSuggesterVariant interface { FieldSuggesterCaster() *FieldSuggester } diff --git a/typedapi/types/fieldsummary.go b/typedapi/types/fieldsummary.go index f98f77d5cd..f5f90b30ed 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // FieldSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L58-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L58-L67 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 6470171064..c9a9aa9280 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FieldTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L136-L167 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 74a49b6f83..c12f0e61f1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,21 +31,23 @@ import ( // FieldTypesMappings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L109-L134 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7952485933..8419a3180e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -28,7 +28,7 @@ package types // bool // nil // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L25-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L25-L31 type FieldValue any type FieldValueVariant interface { diff --git a/typedapi/types/fieldvaluefactorscorefunction.go b/typedapi/types/fieldvaluefactorscorefunction.go index 711e3630ae..3d9caec08d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // FieldValueFactorScoreFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L149-L168 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -116,8 +116,6 @@ func NewFieldValueFactorScoreFunction() *FieldValueFactorScoreFunction { return r } -// true - type FieldValueFactorScoreFunctionVariant interface { FieldValueFactorScoreFunctionCaster() *FieldValueFactorScoreFunction } diff --git a/typedapi/types/filecountsnapshotstats.go b/typedapi/types/filecountsnapshotstats.go index ce00aa63c1..755f7e1994 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FileCountSnapshotStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/FileCountSnapshotStats.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2bc8aff141..0d4f8ed740 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FileDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/recovery/types.ts#L50-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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/filesettingsindicator.go b/typedapi/types/filesettingsindicator.go index cc1c327067..3a8cdc357d 100644 --- a/typedapi/types/filesettingsindicator.go +++ b/typedapi/types/filesettingsindicator.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // FileSettingsIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L207-L211 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L208-L212 type FileSettingsIndicator struct { Details *FileSettingsIndicatorDetails `json:"details,omitempty"` Diagnosis []Diagnosis `json:"diagnosis,omitempty"` @@ -100,5 +100,3 @@ func NewFileSettingsIndicator() *FileSettingsIndicator { return r } - -// false diff --git a/typedapi/types/filesettingsindicatordetails.go b/typedapi/types/filesettingsindicatordetails.go index 593b6356da..ffe9ef6d0b 100644 --- a/typedapi/types/filesettingsindicatordetails.go +++ b/typedapi/types/filesettingsindicatordetails.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FileSettingsIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L213-L216 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L214-L217 type FileSettingsIndicatorDetails struct { FailureStreak int64 `json:"failure_streak"` MostRecentFailure string `json:"most_recent_failure"` @@ -90,5 +90,3 @@ func NewFileSettingsIndicatorDetails() *FileSettingsIndicatorDetails { return r } - -// false diff --git a/typedapi/types/filesystem.go b/typedapi/types/filesystem.go index 0edf609b83..2e64954bbf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FileSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L769-L787 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6cc05a74ff..5a5d89bf26 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FileSystemTotal type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L828-L857 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a5476b75d1..91b1821c58 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FillMaskInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L284-L299 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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). @@ -130,8 +130,6 @@ func NewFillMaskInferenceOptions() *FillMaskInferenceOptions { return r } -// true - type FillMaskInferenceOptionsVariant interface { FillMaskInferenceOptionsCaster() *FillMaskInferenceOptions } diff --git a/typedapi/types/fillmaskinferenceupdateoptions.go b/typedapi/types/fillmaskinferenceupdateoptions.go index 1aaffcb041..d54b72c3d1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FillMaskInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L430-L437 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -102,8 +102,6 @@ func NewFillMaskInferenceUpdateOptions() *FillMaskInferenceUpdateOptions { return r } -// true - type FillMaskInferenceUpdateOptionsVariant interface { FillMaskInferenceUpdateOptionsCaster() *FillMaskInferenceUpdateOptions } diff --git a/typedapi/types/filteraggregate.go b/typedapi/types/filteraggregate.go index 429b8469cc..d8a1c94ef7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // FilterAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L552-L556 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d696ca284f..dda96c9e52 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // FilteringAdvancedSnippet type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L192-L196 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L192-L196 type FilteringAdvancedSnippet struct { CreatedAt DateTime `json:"created_at,omitempty"` UpdatedAt DateTime `json:"updated_at,omitempty"` @@ -79,8 +79,6 @@ func NewFilteringAdvancedSnippet() *FilteringAdvancedSnippet { return r } -// true - type FilteringAdvancedSnippetVariant interface { FilteringAdvancedSnippetCaster() *FilteringAdvancedSnippet } diff --git a/typedapi/types/filteringconfig.go b/typedapi/types/filteringconfig.go index f6540ae404..2c8cf97589 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FilteringConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L209-L213 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L209-L213 type FilteringConfig struct { Active FilteringRules `json:"active"` Domain *string `json:"domain,omitempty"` @@ -87,8 +87,6 @@ func NewFilteringConfig() *FilteringConfig { return r } -// true - type FilteringConfigVariant interface { FilteringConfigCaster() *FilteringConfig } diff --git a/typedapi/types/filteringrule.go b/typedapi/types/filteringrule.go index 20a153e842..bbaa53ebaf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // FilteringRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L170-L179 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L170-L179 type FilteringRule struct { CreatedAt DateTime `json:"created_at,omitempty"` Field string `json:"field"` @@ -131,8 +131,6 @@ func NewFilteringRule() *FilteringRule { return r } -// true - type FilteringRuleVariant interface { FilteringRuleCaster() *FilteringRule } diff --git a/typedapi/types/filteringrules.go b/typedapi/types/filteringrules.go index 030d3ec269..65879bf82d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // FilteringRules type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L203-L207 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L203-L207 type FilteringRules struct { AdvancedSnippet FilteringAdvancedSnippet `json:"advanced_snippet"` Rules []FilteringRule `json:"rules"` @@ -36,8 +36,6 @@ func NewFilteringRules() *FilteringRules { return r } -// true - type FilteringRulesVariant interface { FilteringRulesCaster() *FilteringRules } diff --git a/typedapi/types/filteringrulesvalidation.go b/typedapi/types/filteringrulesvalidation.go index a157c08b24..42cc8200f8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // FilteringRulesValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L198-L201 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L198-L201 type FilteringRulesValidation struct { Errors []FilteringValidation `json:"errors"` State filteringvalidationstate.FilteringValidationState `json:"state"` @@ -39,8 +39,6 @@ func NewFilteringRulesValidation() *FilteringRulesValidation { return r } -// true - type FilteringRulesValidationVariant interface { FilteringRulesValidationCaster() *FilteringRulesValidation } diff --git a/typedapi/types/filteringvalidation.go b/typedapi/types/filteringvalidation.go index f865f7156c..949220fe8f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // FilteringValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L181-L184 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L181-L184 type FilteringValidation struct { Ids []string `json:"ids"` Messages []string `json:"messages"` @@ -35,8 +35,6 @@ func NewFilteringValidation() *FilteringValidation { return r } -// true - type FilteringValidationVariant interface { FilteringValidationCaster() *FilteringValidation } diff --git a/typedapi/types/filterref.go b/typedapi/types/filterref.go index 8c420953cd..22847b8c8e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // FilterRef type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Filter.ts#L31-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Filter.ts#L31-L41 type FilterRef struct { // FilterId The identifier for the filter. FilterId string `json:"filter_id"` @@ -78,8 +78,6 @@ func NewFilterRef() *FilterRef { return r } -// true - type FilterRefVariant interface { FilterRefCaster() *FilterRef } diff --git a/typedapi/types/filtersaggregate.go b/typedapi/types/filtersaggregate.go index 5acfe15a47..9dccb35f31 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // FiltersAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L639-L643 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 31e46dff0e..c56d07b3b5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FiltersAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L374-L394 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L374-L394 type FiltersAggregation struct { // Filters Collection of queries from which to build buckets. Filters BucketsQuery `json:"filters,omitempty"` @@ -133,8 +133,6 @@ func NewFiltersAggregation() *FiltersAggregation { return r } -// true - type FiltersAggregationVariant interface { FiltersAggregationCaster() *FiltersAggregation } diff --git a/typedapi/types/filtersbucket.go b/typedapi/types/filtersbucket.go index 1fc40a92ee..fce9e02d77 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,10 +32,11 @@ import ( // FiltersBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L645-L645 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 39c3aeabaa..c80eeb4507 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FingerprintAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L37-L64 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L37-L64 type FingerprintAnalyzer struct { // MaxOutputSize The maximum token size to emit. Tokens larger than this size will be // discarded. @@ -43,7 +43,7 @@ type FingerprintAnalyzer struct { // Stopwords A pre-defined stop words list like `_english_` or an array containing a list // of stop words. // Defaults to `_none_`. - Stopwords []string `json:"stopwords,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` // StopwordsPath The path to a file containing stop words. StopwordsPath *string `json:"stopwords_path,omitempty"` Type string `json:"type,omitempty"` @@ -94,19 +94,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": @@ -160,8 +149,6 @@ func NewFingerprintAnalyzer() *FingerprintAnalyzer { return r } -// true - type FingerprintAnalyzerVariant interface { FingerprintAnalyzerCaster() *FingerprintAnalyzer } @@ -169,3 +156,8 @@ type FingerprintAnalyzerVariant interface { func (s *FingerprintAnalyzer) FingerprintAnalyzerCaster() *FingerprintAnalyzer { return s } + +func (s *FingerprintAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/fingerprintprocessor.go b/typedapi/types/fingerprintprocessor.go index ed9dee2d55..a4d9d07828 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // FingerprintProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L905-L933 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L905-L933 type FingerprintProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -190,8 +190,6 @@ func NewFingerprintProcessor() *FingerprintProcessor { return r } -// true - type FingerprintProcessorVariant interface { FingerprintProcessorCaster() *FingerprintProcessor } diff --git a/typedapi/types/fingerprinttokenfilter.go b/typedapi/types/fingerprinttokenfilter.go index 0765b388bb..0d19bca637 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,16 @@ import ( // FingerprintTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L195-L199 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -119,8 +123,6 @@ func NewFingerprintTokenFilter() *FingerprintTokenFilter { return r } -// true - type FingerprintTokenFilterVariant interface { FingerprintTokenFilterCaster() *FingerprintTokenFilter } @@ -128,3 +130,8 @@ type FingerprintTokenFilterVariant interface { func (s *FingerprintTokenFilter) FingerprintTokenFilterCaster() *FingerprintTokenFilter { return s } + +func (s *FingerprintTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/finnishanalyzer.go b/typedapi/types/finnishanalyzer.go index f7ec973fc5..274f0d6b88 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // FinnishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L165-L170 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L165-L170 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": @@ -119,8 +108,6 @@ func NewFinnishAnalyzer() *FinnishAnalyzer { return r } -// true - type FinnishAnalyzerVariant interface { FinnishAnalyzerCaster() *FinnishAnalyzer } @@ -128,3 +115,8 @@ type FinnishAnalyzerVariant interface { func (s *FinnishAnalyzer) FinnishAnalyzerCaster() *FinnishAnalyzer { return s } + +func (s *FinnishAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/flattened.go b/typedapi/types/flattened.go index 962acaf33a..2672f486f0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Flattened type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L366-L368 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9cf5a6abd6..ef3be46a1a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // FlattenedProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/complex.ts#L26-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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, } @@ -932,8 +951,6 @@ func NewFlattenedProperty() *FlattenedProperty { return r } -// true - type FlattenedPropertyVariant interface { FlattenedPropertyCaster() *FlattenedProperty } @@ -941,3 +958,8 @@ type FlattenedPropertyVariant interface { func (s *FlattenedProperty) FlattenedPropertyCaster() *FlattenedProperty { return s } + +func (s *FlattenedProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/flattengraphtokenfilter.go b/typedapi/types/flattengraphtokenfilter.go new file mode 100644 index 0000000000..b2d3cafbd9 --- /dev/null +++ b/typedapi/types/flattengraphtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// FlattenGraphTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type FlattenGraphTokenFilterVariant interface { + FlattenGraphTokenFilterCaster() *FlattenGraphTokenFilter +} + +func (s *FlattenGraphTokenFilter) FlattenGraphTokenFilterCaster() *FlattenGraphTokenFilter { + return s +} + +func (s *FlattenGraphTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/floatnumberproperty.go b/typedapi/types/floatnumberproperty.go index 7cf86703ff..20adc7b99e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // FloatNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L156-L159 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L157-L160 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 { @@ -973,8 +985,6 @@ func NewFloatNumberProperty() *FloatNumberProperty { return r } -// true - type FloatNumberPropertyVariant interface { FloatNumberPropertyCaster() *FloatNumberProperty } @@ -982,3 +992,8 @@ type FloatNumberPropertyVariant interface { func (s *FloatNumberProperty) FloatNumberPropertyCaster() *FloatNumberProperty { return s } + +func (s *FloatNumberProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/floatrangeproperty.go b/typedapi/types/floatrangeproperty.go index 4da31fc670..f7115ad3d5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // FloatRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/range.ts#L38-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -896,8 +908,6 @@ func NewFloatRangeProperty() *FloatRangeProperty { return r } -// true - type FloatRangePropertyVariant interface { FloatRangePropertyCaster() *FloatRangeProperty } @@ -905,3 +915,8 @@ type FloatRangePropertyVariant interface { func (s *FloatRangeProperty) FloatRangePropertyCaster() *FloatRangeProperty { return s } + +func (s *FloatRangeProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/flushstats.go b/typedapi/types/flushstats.go index cbaf9fb97a..ed439d0ec8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FlushStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L126-L131 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ac282cb126..71e3f03bcc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // FollowerIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/follow_info/types.ts#L24-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ba16c81f88..1e25359599 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FollowerIndexParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/follow_info/types.ts#L42-L88 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 550ab1fffa..8537f5b324 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // FollowIndexStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/_types/FollowIndexStats.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 695d908a86..a58d418d12 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // FollowStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/stats/types.ts.ts#L49-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9c15fc2ce5..09dedfedcc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ForceMergeAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L123-L126 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L123-L126 type ForceMergeAction struct { IndexCodec *string `json:"index_codec,omitempty"` MaxNumSegments int `json:"max_num_segments"` @@ -92,8 +92,6 @@ func NewForceMergeAction() *ForceMergeAction { return r } -// true - type ForceMergeActionVariant interface { ForceMergeActionCaster() *ForceMergeAction } diff --git a/typedapi/types/foreachprocessor.go b/typedapi/types/foreachprocessor.go index 2afc9d2a2d..b768519d3d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ForeachProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L935-L949 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L935-L949 type ForeachProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -153,8 +153,6 @@ func NewForeachProcessor() *ForeachProcessor { return r } -// true - type ForeachProcessorVariant interface { ForeachProcessorCaster() *ForeachProcessor } diff --git a/typedapi/types/foundstatus.go b/typedapi/types/foundstatus.go index fd375bbcc1..74bd0eea63 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FoundStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/delete_privileges/types.ts#L20-L22 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b832850417..98b073dd23 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // FrenchAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L172-L177 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L172-L177 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": @@ -119,8 +108,6 @@ func NewFrenchAnalyzer() *FrenchAnalyzer { return r } -// true - type FrenchAnalyzerVariant interface { FrenchAnalyzerCaster() *FrenchAnalyzer } @@ -128,3 +115,8 @@ type FrenchAnalyzerVariant interface { func (s *FrenchAnalyzer) FrenchAnalyzerCaster() *FrenchAnalyzer { return s } + +func (s *FrenchAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/frenchstemtokenfilter.go b/typedapi/types/frenchstemtokenfilter.go new file mode 100644 index 0000000000..e4c3ec4729 --- /dev/null +++ b/typedapi/types/frenchstemtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// FrenchStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type FrenchStemTokenFilterVariant interface { + FrenchStemTokenFilterCaster() *FrenchStemTokenFilter +} + +func (s *FrenchStemTokenFilter) FrenchStemTokenFilterCaster() *FrenchStemTokenFilter { + return s +} + +func (s *FrenchStemTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/frequencyencodingpreprocessor.go b/typedapi/types/frequencyencodingpreprocessor.go index a3b139b005..1caf47c8be 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FrequencyEncodingPreprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/types.ts#L38-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L38-L42 type FrequencyEncodingPreprocessor struct { FeatureName string `json:"feature_name"` Field string `json:"field"` @@ -99,8 +99,6 @@ func NewFrequencyEncodingPreprocessor() *FrequencyEncodingPreprocessor { return r } -// true - type FrequencyEncodingPreprocessorVariant interface { FrequencyEncodingPreprocessorCaster() *FrequencyEncodingPreprocessor } diff --git a/typedapi/types/frequentitemsetsaggregate.go b/typedapi/types/frequentitemsetsaggregate.go index 5d29e539f5..0814670bd6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // FrequentItemSetsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L722-L723 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 15851f41a6..1413f8666a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FrequentItemSetsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1241-L1268 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1241-L1268 type FrequentItemSetsAggregation struct { // Fields Fields to analyze. Fields []FrequentItemSetsField `json:"fields"` @@ -130,8 +130,6 @@ func NewFrequentItemSetsAggregation() *FrequentItemSetsAggregation { return r } -// true - type FrequentItemSetsAggregationVariant interface { FrequentItemSetsAggregationCaster() *FrequentItemSetsAggregation } diff --git a/typedapi/types/frequentitemsetsbucket.go b/typedapi/types/frequentitemsetsbucket.go index e24c3833be..77a901a0f5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // FrequentItemSetsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L725-L728 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 13ff45581e..b2aa684e23 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // FrequentItemSetsField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1227-L1239 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -125,8 +125,6 @@ func NewFrequentItemSetsField() *FrequentItemSetsField { return r } -// true - type FrequentItemSetsFieldVariant interface { FrequentItemSetsFieldCaster() *FrequentItemSetsField } diff --git a/typedapi/types/functionscore.go b/typedapi/types/functionscore.go index f11f6dc897..084109b471 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FunctionScore type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L226-L266 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -209,8 +209,6 @@ func NewFunctionScore() *FunctionScore { return r } -// true - type FunctionScoreVariant interface { FunctionScoreCaster() *FunctionScore } diff --git a/typedapi/types/functionscorequery.go b/typedapi/types/functionscorequery.go index 80c7899120..d6bfd266e9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // FunctionScoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L105-L135 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -170,8 +170,6 @@ func NewFunctionScoreQuery() *FunctionScoreQuery { return r } -// true - type FunctionScoreQueryVariant interface { FunctionScoreQueryCaster() *FunctionScoreQuery } diff --git a/typedapi/types/fuzziness.go b/typedapi/types/fuzziness.go index 0a7ac81c8e..597c2b44e1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // int // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L130-L131 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L130-L131 type Fuzziness any type FuzzinessVariant interface { diff --git a/typedapi/types/fuzzyquery.go b/typedapi/types/fuzzyquery.go index e988f4b3fa..5c270b00b7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // FuzzyQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L48-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -190,8 +190,6 @@ func NewFuzzyQuery() *FuzzyQuery { return r } -// true - type FuzzyQueryVariant interface { FuzzyQueryCaster() *FuzzyQuery } diff --git a/typedapi/types/galiciananalyzer.go b/typedapi/types/galiciananalyzer.go index 62dd2fe2a7..0105e00e2f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // GalicianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L179-L184 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L179-L184 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": @@ -119,8 +108,6 @@ func NewGalicianAnalyzer() *GalicianAnalyzer { return r } -// true - type GalicianAnalyzerVariant interface { GalicianAnalyzerCaster() *GalicianAnalyzer } @@ -128,3 +115,8 @@ type GalicianAnalyzerVariant interface { func (s *GalicianAnalyzer) GalicianAnalyzerCaster() *GalicianAnalyzer { return s } + +func (s *GalicianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/garbagecollector.go b/typedapi/types/garbagecollector.go index 915fc6ca9a..e923f29135 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // GarbageCollector type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L994-L999 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4c7c3a5fc4..3f630569b2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GarbageCollectorTotal type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L1001-L1014 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4e2121451d..3f957ca84f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // GcsRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L52-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L52-L62 type GcsRepository struct { // Settings The repository settings. Settings GcsRepositorySettings `json:"settings"` @@ -95,8 +95,6 @@ func NewGcsRepository() *GcsRepository { return r } -// true - type GcsRepositoryVariant interface { GcsRepositoryCaster() *GcsRepository } @@ -104,3 +102,8 @@ type GcsRepositoryVariant interface { func (s *GcsRepository) GcsRepositoryCaster() *GcsRepository { return s } + +func (s *GcsRepository) RepositoryCaster() *Repository { + o := Repository(s) + return &o +} diff --git a/typedapi/types/gcsrepositorysettings.go b/typedapi/types/gcsrepositorysettings.go index 3b99dbb8b4..119e23ab88 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GcsRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L198-L235 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L198-L235 type GcsRepositorySettings struct { // ApplicationName The name used by the client when it uses the Google Cloud Storage service. ApplicationName *string `json:"application_name,omitempty"` @@ -208,8 +208,6 @@ func NewGcsRepositorySettings() *GcsRepositorySettings { return r } -// true - type GcsRepositorySettingsVariant interface { GcsRepositorySettingsCaster() *GcsRepositorySettings } diff --git a/typedapi/types/geoboundingboxquery.go b/typedapi/types/geoboundingboxquery.go index 0aa5e0a93d..4dcf2547da 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // GeoBoundingBoxQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/geo.ts#L35-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -178,8 +178,6 @@ func NewGeoBoundingBoxQuery() *GeoBoundingBoxQuery { return r } -// true - type GeoBoundingBoxQueryVariant interface { GeoBoundingBoxQueryCaster() *GeoBoundingBoxQuery } diff --git a/typedapi/types/geobounds.go b/typedapi/types/geobounds.go index ab984092eb..a35b3e5b6e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ package types // TopRightBottomLeftGeoBounds // WktGeoBounds // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L135-L148 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L135-L148 type GeoBounds any type GeoBoundsVariant interface { diff --git a/typedapi/types/geoboundsaggregate.go b/typedapi/types/geoboundsaggregate.go index 1d32d157d5..fef23b70d1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // GeoBoundsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L327-L333 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8084cb909b..31b139fc9c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoBoundsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L108-L117 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L114-L123 type GeoBoundsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -100,8 +100,6 @@ func NewGeoBoundsAggregation() *GeoBoundsAggregation { return r } -// true - type GeoBoundsAggregationVariant interface { GeoBoundsAggregationCaster() *GeoBoundsAggregation } diff --git a/typedapi/types/geocentroidaggregate.go b/typedapi/types/geocentroidaggregate.go index deb5141aa6..7bf62cd74f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoCentroidAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L335-L342 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 aa028492ea..84cda571e9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoCentroidAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L119-L122 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L125-L128 type GeoCentroidAggregation struct { Count *int64 `json:"count,omitempty"` // Field The field on which to run the aggregation. @@ -145,8 +145,6 @@ func NewGeoCentroidAggregation() *GeoCentroidAggregation { return r } -// true - type GeoCentroidAggregationVariant interface { GeoCentroidAggregationCaster() *GeoCentroidAggregation } diff --git a/typedapi/types/geodecayfunction.go b/typedapi/types/geodecayfunction.go index 95e8854893..f37bbc57db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,7 +29,7 @@ import ( // GeoDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L210-L213 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -75,8 +75,6 @@ func NewGeoDecayFunction() *GeoDecayFunction { return r } -// true - type GeoDecayFunctionVariant interface { GeoDecayFunctionCaster() *GeoDecayFunction } @@ -84,3 +82,8 @@ type GeoDecayFunctionVariant interface { func (s *GeoDecayFunction) GeoDecayFunctionCaster() *GeoDecayFunction { return s } + +func (s *GeoDecayFunction) DecayFunctionCaster() *DecayFunction { + o := DecayFunction(s) + return &o +} diff --git a/typedapi/types/geodistanceaggregate.go b/typedapi/types/geodistanceaggregate.go index 32fdc3286b..64417b5703 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // GeoDistanceAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L617-L622 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1498b39d5f..72f915d7f6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // GeoDistanceAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L396-L419 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L396-L419 type GeoDistanceAggregation struct { // DistanceType The distance calculation type. DistanceType *geodistancetype.GeoDistanceType `json:"distance_type,omitempty"` @@ -139,8 +139,6 @@ func NewGeoDistanceAggregation() *GeoDistanceAggregation { return r } -// true - type GeoDistanceAggregationVariant interface { GeoDistanceAggregationCaster() *GeoDistanceAggregation } diff --git a/typedapi/types/geodistancefeaturequery.go b/typedapi/types/geodistancefeaturequery.go index e6484b9f4f..b315ee3e0e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoDistanceFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L66-L69 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -172,8 +172,6 @@ func NewGeoDistanceFeatureQuery() *GeoDistanceFeatureQuery { return r } -// true - type GeoDistanceFeatureQueryVariant interface { GeoDistanceFeatureQueryCaster() *GeoDistanceFeatureQuery } @@ -181,3 +179,8 @@ type GeoDistanceFeatureQueryVariant interface { func (s *GeoDistanceFeatureQuery) GeoDistanceFeatureQueryCaster() *GeoDistanceFeatureQuery { return s } + +func (s *GeoDistanceFeatureQuery) DistanceFeatureQueryCaster() *DistanceFeatureQuery { + o := DistanceFeatureQuery(s) + return &o +} diff --git a/typedapi/types/geodistancequery.go b/typedapi/types/geodistancequery.go index 5c44bcf47e..14dd519f81 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // GeoDistanceQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/geo.ts#L64-L96 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -189,8 +189,6 @@ func NewGeoDistanceQuery() *GeoDistanceQuery { return r } -// true - type GeoDistanceQueryVariant interface { GeoDistanceQueryCaster() *GeoDistanceQuery } diff --git a/typedapi/types/geodistancesort.go b/typedapi/types/geodistancesort.go index 940e35dcde..5911c522e8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // GeoDistanceSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/sort.ts#L58-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L58-L70 type GeoDistanceSort struct { DistanceType *geodistancetype.GeoDistanceType `json:"distance_type,omitempty"` GeoDistanceSort map[string][]GeoLocation `json:"-"` @@ -167,8 +167,6 @@ func NewGeoDistanceSort() *GeoDistanceSort { return r } -// true - type GeoDistanceSortVariant interface { GeoDistanceSortCaster() *GeoDistanceSort } diff --git a/typedapi/types/geogridprocessor.go b/typedapi/types/geogridprocessor.go index 605730fc9f..8144336056 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // GeoGridProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L389-L430 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L389-L430 type GeoGridProcessor struct { // ChildrenField If specified and children tiles exist, save those tile addresses to this // field as an array of strings. @@ -209,8 +209,6 @@ func NewGeoGridProcessor() *GeoGridProcessor { return r } -// true - type GeoGridProcessorVariant interface { GeoGridProcessorCaster() *GeoGridProcessor } diff --git a/typedapi/types/geogridquery.go b/typedapi/types/geogridquery.go index cb900fca2c..fd2593f398 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoGridQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/geo.ts#L98-L103 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -160,8 +160,6 @@ func NewGeoGridQuery() *GeoGridQuery { return r } -// true - type GeoGridQueryVariant interface { GeoGridQueryCaster() *GeoGridQuery } diff --git a/typedapi/types/geohashgridaggregate.go b/typedapi/types/geohashgridaggregate.go index 9bff634315..959272d3bf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // GeoHashGridAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L566-L568 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e557127f72..6daf1b7d2c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoHashGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L421-L449 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -182,8 +182,6 @@ func NewGeoHashGridAggregation() *GeoHashGridAggregation { return r } -// true - type GeoHashGridAggregationVariant interface { GeoHashGridAggregationCaster() *GeoHashGridAggregation } diff --git a/typedapi/types/geohashgridbucket.go b/typedapi/types/geohashgridbucket.go index 44fdbd61ed..6c774a3ebf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // GeoHashGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L570-L572 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fd5ac8e171..8321f9ed4a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // GeoHashLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L131-L133 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L131-L133 type GeoHashLocation struct { Geohash string `json:"geohash"` } @@ -67,8 +67,6 @@ func NewGeoHashLocation() *GeoHashLocation { return r } -// true - type GeoHashLocationVariant interface { GeoHashLocationCaster() *GeoHashLocation } @@ -76,3 +74,8 @@ type GeoHashLocationVariant interface { func (s *GeoHashLocation) GeoHashLocationCaster() *GeoHashLocation { return s } + +func (s *GeoHashLocation) GeoLocationCaster() *GeoLocation { + o := GeoLocation(s) + return &o +} diff --git a/typedapi/types/geohashprecision.go b/typedapi/types/geohashprecision.go index 74b241ad68..85e744b1fd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // int // string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L86-L90 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L86-L90 type GeoHashPrecision any type GeoHashPrecisionVariant interface { diff --git a/typedapi/types/geohexgridaggregate.go b/typedapi/types/geohexgridaggregate.go index 6d862f2509..80aeaa095e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // GeoHexGridAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L585-L586 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0d3e5d31a8..39ca148c45 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeohexGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L479-L504 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -190,8 +190,6 @@ func NewGeohexGridAggregation() *GeohexGridAggregation { return r } -// true - type GeohexGridAggregationVariant interface { GeohexGridAggregationCaster() *GeohexGridAggregation } diff --git a/typedapi/types/geohexgridbucket.go b/typedapi/types/geohexgridbucket.go index f602efec19..4547cad34a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // GeoHexGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L588-L590 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 20479a20b1..353ca1615b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoipDatabaseConfigurationMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/get_geoip_database/GetGeoipDatabaseResponse.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 77cfb1af74..651ad3a0f2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoIpDownloadStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/geo_ip_stats/types.ts#L24-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9c20922887..f376a9359f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // GeoIpNodeDatabaseName type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/geo_ip_stats/types.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2216f5447c..51e39e23b9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // GeoIpNodeDatabases type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/geo_ip_stats/types.ts#L39-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 09a07340c2..565e7463c7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoIpProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L443-L477 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L443-L477 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 @@ -214,8 +214,6 @@ func NewGeoIpProcessor() *GeoIpProcessor { return r } -// true - type GeoIpProcessorVariant interface { GeoIpProcessorCaster() *GeoIpProcessor } diff --git a/typedapi/types/geoline.go b/typedapi/types/geoline.go index 72cf814c7d..2d1371e3a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoLine type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L56-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8e049098be..6ec22664e7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoLineAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L902-L912 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cab8b2c6a3..1cf1a94f29 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // GeoLineAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L124-L149 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -124,8 +124,6 @@ func NewGeoLineAggregation() *GeoLineAggregation { return r } -// true - type GeoLineAggregationVariant interface { GeoLineAggregationCaster() *GeoLineAggregation } diff --git a/typedapi/types/geolinepoint.go b/typedapi/types/geolinepoint.go index 2597b8e119..007fcad123 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // GeoLinePoint type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L158-L163 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L164-L169 type GeoLinePoint struct { // Field The name of the geo_point field. Field string `json:"field"` @@ -68,8 +68,6 @@ func NewGeoLinePoint() *GeoLinePoint { return r } -// true - type GeoLinePointVariant interface { GeoLinePointCaster() *GeoLinePoint } diff --git a/typedapi/types/geolinesort.go b/typedapi/types/geolinesort.go index 40b5b3db54..a41843be0d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // GeoLineSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L151-L156 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -68,8 +68,6 @@ func NewGeoLineSort() *GeoLineSort { return r } -// true - type GeoLineSortVariant interface { GeoLineSortCaster() *GeoLineSort } diff --git a/typedapi/types/geolocation.go b/typedapi/types/geolocation.go index 7ade64c9ba..f529a91059 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ package types // []Float64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L104-L118 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L104-L118 type GeoLocation any type GeoLocationVariant interface { diff --git a/typedapi/types/geopointproperty.go b/typedapi/types/geopointproperty.go index 3ba9da8ad9..df38107e60 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,13 +29,14 @@ import ( "strconv" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/dynamicmapping" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/geopointmetrictype" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/onscripterror" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/syntheticsourcekeepenum" ) // GeoPointProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/geo.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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, } @@ -956,8 +976,6 @@ func NewGeoPointProperty() *GeoPointProperty { return r } -// true - type GeoPointPropertyVariant interface { GeoPointPropertyCaster() *GeoPointProperty } @@ -965,3 +983,8 @@ type GeoPointPropertyVariant interface { func (s *GeoPointProperty) GeoPointPropertyCaster() *GeoPointProperty { return s } + +func (s *GeoPointProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/geopolygonpoints.go b/typedapi/types/geopolygonpoints.go index 7a497ab26f..c18c282533 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // GeoPolygonPoints type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/geo.ts#L105-L107 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/geo.ts#L105-L107 type GeoPolygonPoints struct { Points []GeoLocation `json:"points"` } @@ -34,8 +34,6 @@ func NewGeoPolygonPoints() *GeoPolygonPoints { return r } -// true - type GeoPolygonPointsVariant interface { GeoPolygonPointsCaster() *GeoPolygonPoints } diff --git a/typedapi/types/geopolygonquery.go b/typedapi/types/geopolygonquery.go index adb87cb033..c437f30327 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // GeoPolygonQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/geo.ts#L109-L121 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -165,8 +165,6 @@ func NewGeoPolygonQuery() *GeoPolygonQuery { return r } -// true - type GeoPolygonQueryVariant interface { GeoPolygonQueryCaster() *GeoPolygonQuery } diff --git a/typedapi/types/georesults.go b/typedapi/types/georesults.go index 255b3bf257..0d2dd605b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoResults type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Anomaly.ts#L146-L155 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a50629c5b0..d50331716e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // GeoShapeFieldQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/geo.ts#L128-L139 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -84,8 +84,6 @@ func NewGeoShapeFieldQuery() *GeoShapeFieldQuery { return r } -// true - type GeoShapeFieldQueryVariant interface { GeoShapeFieldQueryCaster() *GeoShapeFieldQuery } diff --git a/typedapi/types/geoshapeproperty.go b/typedapi/types/geoshapeproperty.go index 50b5275e85..596ff53932 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // GeoShapeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/geo.ts#L41-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -926,8 +938,6 @@ func NewGeoShapeProperty() *GeoShapeProperty { return r } -// true - type GeoShapePropertyVariant interface { GeoShapePropertyCaster() *GeoShapeProperty } @@ -935,3 +945,8 @@ type GeoShapePropertyVariant interface { func (s *GeoShapeProperty) GeoShapePropertyCaster() *GeoShapeProperty { return s } + +func (s *GeoShapeProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/geoshapequery.go b/typedapi/types/geoshapequery.go index da8d6e6425..655eccea35 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoShapeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/geo.ts#L141-L157 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -160,8 +160,6 @@ func NewGeoShapeQuery() *GeoShapeQuery { return r } -// true - type GeoShapeQueryVariant interface { GeoShapeQueryCaster() *GeoShapeQuery } diff --git a/typedapi/types/geotilegridaggregate.go b/typedapi/types/geotilegridaggregate.go index 53a2cc8a38..54d8877e31 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // GeoTileGridAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L574-L579 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2bfb60c600..5dbd6d666d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GeoTileGridAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L451-L477 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -182,8 +182,6 @@ func NewGeoTileGridAggregation() *GeoTileGridAggregation { return r } -// true - type GeoTileGridAggregationVariant interface { GeoTileGridAggregationCaster() *GeoTileGridAggregation } diff --git a/typedapi/types/geotilegridbucket.go b/typedapi/types/geotilegridbucket.go index 4842b6711a..7e22c911fa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // GeoTileGridBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L581-L583 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ec610422a2..b8651c845d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // GermanAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L186-L191 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L186-L191 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": @@ -119,8 +108,6 @@ func NewGermanAnalyzer() *GermanAnalyzer { return r } -// true - type GermanAnalyzerVariant interface { GermanAnalyzerCaster() *GermanAnalyzer } @@ -128,3 +115,8 @@ type GermanAnalyzerVariant interface { func (s *GermanAnalyzer) GermanAnalyzerCaster() *GermanAnalyzer { return s } + +func (s *GermanAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/germannormalizationtokenfilter.go b/typedapi/types/germannormalizationtokenfilter.go new file mode 100644 index 0000000000..ccbec068df --- /dev/null +++ b/typedapi/types/germannormalizationtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// GermanNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type GermanNormalizationTokenFilterVariant interface { + GermanNormalizationTokenFilterCaster() *GermanNormalizationTokenFilter +} + +func (s *GermanNormalizationTokenFilter) GermanNormalizationTokenFilterCaster() *GermanNormalizationTokenFilter { + return s +} + +func (s *GermanNormalizationTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/germanstemtokenfilter.go b/typedapi/types/germanstemtokenfilter.go new file mode 100644 index 0000000000..2ca77b5896 --- /dev/null +++ b/typedapi/types/germanstemtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// GermanStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type GermanStemTokenFilterVariant interface { + GermanStemTokenFilterCaster() *GermanStemTokenFilter +} + +func (s *GermanStemTokenFilter) GermanStemTokenFilterCaster() *GermanStemTokenFilter { + return s +} + +func (s *GermanStemTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/getmigrationfeature.go b/typedapi/types/getmigrationfeature.go index 9485224a62..79af78b86c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // GetMigrationFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L37-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f1bf89a956..b15f170c10 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GetResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/get/types.ts#L25-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d4944d1272..62873d2b90 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // GetScriptContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/get_script_context/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 27101004d0..327a74f36b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GetStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L133-L144 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 090fed1951..c7ad22b769 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GetUserProfileErrors type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_user_profile/types.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 17af55f2fc..e0f37cd5cf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // GlobalAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L546-L550 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cbb1840b74..9b2502bdd9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // GlobalAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L506-L506 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L506-L506 type GlobalAggregation struct { } @@ -33,8 +33,6 @@ func NewGlobalAggregation() *GlobalAggregation { return r } -// true - type GlobalAggregationVariant interface { GlobalAggregationCaster() *GlobalAggregation } diff --git a/typedapi/types/globalordinalfieldstats.go b/typedapi/types/globalordinalfieldstats.go new file mode 100644 index 0000000000..3326107809 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// GlobalOrdinalFieldStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..05fff79772 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// GlobalOrdinalsStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b39836e586..60498844d8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // GlobalPrivilege type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L432-L434 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L432-L434 type GlobalPrivilege struct { Application ApplicationGlobalUserPrivileges `json:"application"` } @@ -34,8 +34,6 @@ func NewGlobalPrivilege() *GlobalPrivilege { return r } -// true - type GlobalPrivilegeVariant interface { GlobalPrivilegeCaster() *GlobalPrivilege } diff --git a/typedapi/types/googleaistudioservicesettings.go b/typedapi/types/googleaistudioservicesettings.go index 70151c6f15..7888ef01e2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GoogleAiStudioServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L794-L810 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -101,8 +101,6 @@ func NewGoogleAiStudioServiceSettings() *GoogleAiStudioServiceSettings { return r } -// true - type GoogleAiStudioServiceSettingsVariant interface { GoogleAiStudioServiceSettingsCaster() *GoogleAiStudioServiceSettings } diff --git a/typedapi/types/googlenormalizeddistanceheuristic.go b/typedapi/types/googlenormalizeddistanceheuristic.go index 8d2b2bac54..d99287bbe9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GoogleNormalizedDistanceHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L793-L798 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -79,8 +79,6 @@ func NewGoogleNormalizedDistanceHeuristic() *GoogleNormalizedDistanceHeuristic { return r } -// true - type GoogleNormalizedDistanceHeuristicVariant interface { GoogleNormalizedDistanceHeuristicCaster() *GoogleNormalizedDistanceHeuristic } diff --git a/typedapi/types/googlevertexaiservicesettings.go b/typedapi/types/googlevertexaiservicesettings.go index ecafaa7e65..6c584ac162 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GoogleVertexAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L821-L847 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -130,8 +130,6 @@ func NewGoogleVertexAIServiceSettings() *GoogleVertexAIServiceSettings { return r } -// true - type GoogleVertexAIServiceSettingsVariant interface { GoogleVertexAIServiceSettingsCaster() *GoogleVertexAIServiceSettings } diff --git a/typedapi/types/googlevertexaitasksettings.go b/typedapi/types/googlevertexaitasksettings.go index cad4d88282..b0166dbeee 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GoogleVertexAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L849-L858 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -98,8 +98,6 @@ func NewGoogleVertexAITaskSettings() *GoogleVertexAITaskSettings { return r } -// true - type GoogleVertexAITaskSettingsVariant interface { GoogleVertexAITaskSettingsCaster() *GoogleVertexAITaskSettings } diff --git a/typedapi/types/grantapikey.go b/typedapi/types/grantapikey.go index ad08796261..fbf150da81 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // GrantApiKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/grant_api_key/types.ts#L25-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -111,8 +111,6 @@ func NewGrantApiKey() *GrantApiKey { return r } -// true - type GrantApiKeyVariant interface { GrantApiKeyCaster() *GrantApiKey } diff --git a/typedapi/types/greaterthanvalidation.go b/typedapi/types/greaterthanvalidation.go index 456dc21c26..f5cd4c3655 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GreaterThanValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L63-L66 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L63-L66 type GreaterThanValidation struct { Constraint Float64 `json:"constraint"` Type string `json:"type,omitempty"` @@ -98,8 +98,6 @@ func NewGreaterThanValidation() *GreaterThanValidation { return r } -// true - type GreaterThanValidationVariant interface { GreaterThanValidationCaster() *GreaterThanValidation } @@ -107,3 +105,8 @@ type GreaterThanValidationVariant interface { func (s *GreaterThanValidation) GreaterThanValidationCaster() *GreaterThanValidation { return s } + +func (s *GreaterThanValidation) ValidationCaster() *Validation { + o := Validation(s) + return &o +} diff --git a/typedapi/types/greekanalyzer.go b/typedapi/types/greekanalyzer.go index 53a08ac29e..2157fb53a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,11 @@ import ( // GreekAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L193-L197 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L193-L197 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": @@ -112,8 +101,6 @@ func NewGreekAnalyzer() *GreekAnalyzer { return r } -// true - type GreekAnalyzerVariant interface { GreekAnalyzerCaster() *GreekAnalyzer } @@ -121,3 +108,8 @@ type GreekAnalyzerVariant interface { func (s *GreekAnalyzer) GreekAnalyzerCaster() *GreekAnalyzer { return s } + +func (s *GreekAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/grokprocessor.go b/typedapi/types/grokprocessor.go index 5936badfde..b9b01a579e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GrokProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L951-L982 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L951-L982 type GrokProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -201,8 +201,6 @@ func NewGrokProcessor() *GrokProcessor { return r } -// true - type GrokProcessorVariant interface { GrokProcessorCaster() *GrokProcessor } diff --git a/typedapi/types/groupings.go b/typedapi/types/groupings.go index b434a3ea9b..46bf051abe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Groupings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/_types/Groupings.ts#L24-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -46,8 +46,6 @@ func NewGroupings() *Groupings { return r } -// true - type GroupingsVariant interface { GroupingsCaster() *Groupings } diff --git a/typedapi/types/gsubprocessor.go b/typedapi/types/gsubprocessor.go index 5a114267b8..325cbe3d0a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // GsubProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L984-L1008 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L984-L1008 type GsubProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -182,8 +182,6 @@ func NewGsubProcessor() *GsubProcessor { return r } -// true - type GsubProcessorVariant interface { GsubProcessorCaster() *GsubProcessor } diff --git a/typedapi/types/halffloatnumberproperty.go b/typedapi/types/halffloatnumberproperty.go index 664d86072c..a932fd1336 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // HalfFloatNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L161-L164 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L162-L165 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 { @@ -973,8 +985,6 @@ func NewHalfFloatNumberProperty() *HalfFloatNumberProperty { return r } -// true - type HalfFloatNumberPropertyVariant interface { HalfFloatNumberPropertyCaster() *HalfFloatNumberProperty } @@ -982,3 +992,8 @@ type HalfFloatNumberPropertyVariant interface { func (s *HalfFloatNumberProperty) HalfFloatNumberPropertyCaster() *HalfFloatNumberProperty { return s } + +func (s *HalfFloatNumberProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/haschildquery.go b/typedapi/types/haschildquery.go index 47c386b6b9..07889ef72f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // HasChildQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/joining.ts#L41-L79 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -189,8 +189,6 @@ func NewHasChildQuery() *HasChildQuery { return r } -// true - type HasChildQueryVariant interface { HasChildQueryCaster() *HasChildQuery } diff --git a/typedapi/types/hasparentquery.go b/typedapi/types/hasparentquery.go index 761fe1240f..9d46a2b857 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HasParentQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/joining.ts#L81-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -156,8 +156,6 @@ func NewHasParentQuery() *HasParentQuery { return r } -// true - type HasParentQueryVariant interface { HasParentQueryCaster() *HasParentQuery } diff --git a/typedapi/types/hasprivilegesuserprofileerrors.go b/typedapi/types/hasprivilegesuserprofileerrors.go index 1a7ab9b709..00c715b84a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HasPrivilegesUserProfileErrors type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/has_privileges_user_profile/types.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 38d2a18bb9..6557938ec7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HdrMethod type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L225-L230 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L237-L242 type HdrMethod struct { // NumberOfSignificantValueDigits Specifies the resolution of values for the histogram in number of significant // digits. @@ -81,8 +81,6 @@ func NewHdrMethod() *HdrMethod { return r } -// true - type HdrMethodVariant interface { HdrMethodCaster() *HdrMethod } diff --git a/typedapi/types/hdrpercentileranksaggregate.go b/typedapi/types/hdrpercentileranksaggregate.go index 821cbc4e80..8745782833 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // HdrPercentileRanksAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L171-L172 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1c27f8ca91..7c57d4f5c3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // HdrPercentilesAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L168-L169 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 027e11c443..72f9bbc557 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HealthRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/health/types.ts#L23-L99 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3c3f5595e7..9164232aed 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HealthStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L150-L152 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 99f0393b73..da445c8487 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -38,7 +38,7 @@ import ( // Highlight type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/highlighting.ts#L152-L155 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L152-L157 type Highlight struct { // BoundaryChars A string that contains each boundary character. BoundaryChars *string `json:"boundary_chars,omitempty"` @@ -54,7 +54,7 @@ type Highlight struct { // `"fr-FR"`, `"ja-JP"`. BoundaryScannerLocale *string `json:"boundary_scanner_locale,omitempty"` Encoder *highlighterencoder.HighlighterEncoder `json:"encoder,omitempty"` - Fields map[string]HighlightField `json:"fields"` + Fields []map[string]HighlightField `json:"fields"` ForceSource *bool `json:"force_source,omitempty"` // FragmentSize The size of the highlighted fragment in characters. FragmentSize *int `json:"fragment_size,omitempty"` @@ -182,11 +182,24 @@ func (s *Highlight) UnmarshalJSON(data []byte) error { } case "fields": - if s.Fields == nil { - s.Fields = make(map[string]HighlightField, 0) - } - if err := dec.Decode(&s.Fields); err != nil { - return fmt.Errorf("%s | %w", "Fields", err) + + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + source := bytes.NewReader(rawMsg) + localDec := json.NewDecoder(source) + switch rawMsg[0] { + case '{': + o := make(map[string]HighlightField, 0) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Fields", err) + } + s.Fields = append(s.Fields, o) + case '[': + o := make([]map[string]HighlightField, 0) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Fields", err) + } + s.Fields = o } case "force_source": @@ -378,15 +391,12 @@ func (s *Highlight) UnmarshalJSON(data []byte) error { // NewHighlight returns a Highlight. func NewHighlight() *Highlight { r := &Highlight{ - Fields: make(map[string]HighlightField), Options: make(map[string]json.RawMessage), } return r } -// true - type HighlightVariant interface { HighlightCaster() *Highlight } diff --git a/typedapi/types/highlightfield.go b/typedapi/types/highlightfield.go index ad51dff210..8ffb94a07f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -37,7 +37,7 @@ import ( // HighlightField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/highlighting.ts#L192-L195 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/highlighting.ts#L194-L197 type HighlightField struct { // BoundaryChars A string that contains each boundary character. BoundaryChars *string `json:"boundary_chars,omitempty"` @@ -402,8 +402,6 @@ func NewHighlightField() *HighlightField { return r } -// true - type HighlightFieldVariant interface { HighlightFieldCaster() *HighlightField } diff --git a/typedapi/types/hindianalyzer.go b/typedapi/types/hindianalyzer.go index c2288d4239..4ed41d6283 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // HindiAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L199-L204 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L199-L204 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": @@ -119,8 +108,6 @@ func NewHindiAnalyzer() *HindiAnalyzer { return r } -// true - type HindiAnalyzerVariant interface { HindiAnalyzerCaster() *HindiAnalyzer } @@ -128,3 +115,8 @@ type HindiAnalyzerVariant interface { func (s *HindiAnalyzer) HindiAnalyzerCaster() *HindiAnalyzer { return s } + +func (s *HindiAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/hindinormalizationtokenfilter.go b/typedapi/types/hindinormalizationtokenfilter.go new file mode 100644 index 0000000000..6d0ce58bc7 --- /dev/null +++ b/typedapi/types/hindinormalizationtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// HindiNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type HindiNormalizationTokenFilterVariant interface { + HindiNormalizationTokenFilterCaster() *HindiNormalizationTokenFilter +} + +func (s *HindiNormalizationTokenFilter) HindiNormalizationTokenFilterCaster() *HindiNormalizationTokenFilter { + return s +} + +func (s *HindiNormalizationTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/hint.go b/typedapi/types/hint.go index c630c0f4a0..da7cb92890 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Hint type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/suggest_user_profiles/types.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -41,8 +41,6 @@ func NewHint() *Hint { return r } -// true - type HintVariant interface { HintCaster() *Hint } diff --git a/typedapi/types/histogramaggregate.go b/typedapi/types/histogramaggregate.go index 4299934948..a7ccd6fa06 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // HistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L372-L376 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 be975a9f2b..b5103710dd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // HistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L519-L565 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -224,8 +224,6 @@ func NewHistogramAggregation() *HistogramAggregation { return r } -// true - type HistogramAggregationVariant interface { HistogramAggregationCaster() *HistogramAggregation } diff --git a/typedapi/types/histogrambucket.go b/typedapi/types/histogrambucket.go index a0d60c3006..b5b8e60c1f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // HistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L378-L381 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5b9592539b..1140fe4326 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HistogramGrouping type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/_types/Groupings.ts#L84-L97 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -103,8 +103,6 @@ func NewHistogramGrouping() *HistogramGrouping { return r } -// true - type HistogramGroupingVariant interface { HistogramGroupingCaster() *HistogramGrouping } diff --git a/typedapi/types/histogramproperty.go b/typedapi/types/histogramproperty.go index f53fdc66c6..04c901eece 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // HistogramProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/specialized.ts#L69-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -812,8 +824,6 @@ func NewHistogramProperty() *HistogramProperty { return r } -// true - type HistogramPropertyVariant interface { HistogramPropertyCaster() *HistogramProperty } @@ -821,3 +831,8 @@ type HistogramPropertyVariant interface { func (s *HistogramProperty) HistogramPropertyCaster() *HistogramProperty { return s } + +func (s *HistogramProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/hit.go b/typedapi/types/hit.go index 5540a5be00..ee404f5ee6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Hit type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/hits.ts#L40-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L40-L65 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 ab64c90924..1f5f4e630d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HitsEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/eql/_types/EqlHits.ts#L41-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f5fd8747cd..6d3d419841 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // HitsMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/hits.ts#L67-L73 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L67-L73 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 13b222a2e5..95acf17cf2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // HitsSequence type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/eql/_types/EqlHits.ts#L56-L64 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 98e913f529..c76a04458d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HoltLinearModelSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L297-L300 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L297-L300 type HoltLinearModelSettings struct { Alpha *float32 `json:"alpha,omitempty"` Beta *float32 `json:"beta,omitempty"` @@ -96,8 +96,6 @@ func NewHoltLinearModelSettings() *HoltLinearModelSettings { return r } -// true - type HoltLinearModelSettingsVariant interface { HoltLinearModelSettingsCaster() *HoltLinearModelSettings } diff --git a/typedapi/types/holtmovingaverageaggregation.go b/typedapi/types/holtmovingaverageaggregation.go index b0c0b2aa89..efcf558b77 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // HoltMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L283-L286 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -174,8 +174,6 @@ func NewHoltMovingAverageAggregation() *HoltMovingAverageAggregation { return r } -// true - type HoltMovingAverageAggregationVariant interface { HoltMovingAverageAggregationCaster() *HoltMovingAverageAggregation } @@ -183,3 +181,8 @@ type HoltMovingAverageAggregationVariant interface { func (s *HoltMovingAverageAggregation) HoltMovingAverageAggregationCaster() *HoltMovingAverageAggregation { return s } + +func (s *HoltMovingAverageAggregation) MovingAverageAggregationCaster() *MovingAverageAggregation { + o := MovingAverageAggregation(s) + return &o +} diff --git a/typedapi/types/holtwintersmodelsettings.go b/typedapi/types/holtwintersmodelsettings.go index 4cc8422245..8c882d21c6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // HoltWintersModelSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L301-L308 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L301-L308 type HoltWintersModelSettings struct { Alpha *float32 `json:"alpha,omitempty"` Beta *float32 `json:"beta,omitempty"` @@ -153,8 +153,6 @@ func NewHoltWintersModelSettings() *HoltWintersModelSettings { return r } -// true - type HoltWintersModelSettingsVariant interface { HoltWintersModelSettingsCaster() *HoltWintersModelSettings } diff --git a/typedapi/types/holtwintersmovingaverageaggregation.go b/typedapi/types/holtwintersmovingaverageaggregation.go index c6ee4d664e..2925a8a1d8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // HoltWintersMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L288-L291 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -174,8 +174,6 @@ func NewHoltWintersMovingAverageAggregation() *HoltWintersMovingAverageAggregati return r } -// true - type HoltWintersMovingAverageAggregationVariant interface { HoltWintersMovingAverageAggregationCaster() *HoltWintersMovingAverageAggregation } @@ -183,3 +181,8 @@ type HoltWintersMovingAverageAggregationVariant interface { func (s *HoltWintersMovingAverageAggregation) HoltWintersMovingAverageAggregationCaster() *HoltWintersMovingAverageAggregation { return s } + +func (s *HoltWintersMovingAverageAggregation) MovingAverageAggregationCaster() *MovingAverageAggregation { + o := MovingAverageAggregation(s) + return &o +} diff --git a/typedapi/types/hop.go b/typedapi/types/hop.go index d6c0b447f2..ba5386ff53 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Hop type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/graph/_types/Hop.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -41,8 +41,6 @@ func NewHop() *Hop { return r } -// true - type HopVariant interface { HopCaster() *Hop } diff --git a/typedapi/types/hourandminute.go b/typedapi/types/hourandminute.go index 3aafb64043..61d7b8d8a2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // HourAndMinute type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Schedule.ts#L106-L109 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L106-L109 type HourAndMinute struct { Hour []int `json:"hour"` Minute []int `json:"minute"` @@ -35,8 +35,6 @@ func NewHourAndMinute() *HourAndMinute { return r } -// true - type HourAndMinuteVariant interface { HourAndMinuteCaster() *HourAndMinute } @@ -44,3 +42,8 @@ type HourAndMinuteVariant interface { func (s *HourAndMinute) HourAndMinuteCaster() *HourAndMinute { return s } + +func (s *HourAndMinute) ScheduleTimeOfDayCaster() *ScheduleTimeOfDay { + o := ScheduleTimeOfDay(s) + return &o +} diff --git a/typedapi/types/hourlyschedule.go b/typedapi/types/hourlyschedule.go index 47195db635..7509fdbf34 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // HourlySchedule type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Schedule.ts#L47-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L47-L49 type HourlySchedule struct { Minute []int `json:"minute"` } @@ -34,8 +34,6 @@ func NewHourlySchedule() *HourlySchedule { return r } -// true - type HourlyScheduleVariant interface { HourlyScheduleCaster() *HourlySchedule } diff --git a/typedapi/types/htmlstripcharfilter.go b/typedapi/types/htmlstripcharfilter.go index 0e8a38a26e..b3127eca6b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // HtmlStripCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/char_filters.ts#L46-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/char_filters.ts#L46-L49 type HtmlStripCharFilter struct { EscapedTags []string `json:"escaped_tags,omitempty"` Type string `json:"type,omitempty"` @@ -93,8 +93,6 @@ func NewHtmlStripCharFilter() *HtmlStripCharFilter { return r } -// true - type HtmlStripCharFilterVariant interface { HtmlStripCharFilterCaster() *HtmlStripCharFilter } @@ -102,3 +100,8 @@ type HtmlStripCharFilterVariant interface { func (s *HtmlStripCharFilter) HtmlStripCharFilterCaster() *HtmlStripCharFilter { return s } + +func (s *HtmlStripCharFilter) CharFilterDefinitionCaster() *CharFilterDefinition { + o := CharFilterDefinition(s) + return &o +} diff --git a/typedapi/types/htmlstripprocessor.go b/typedapi/types/htmlstripprocessor.go index 1518c0a160..3b29b265c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HtmlStripProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1010-L1026 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1010-L1026 type HtmlStripProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -154,8 +154,6 @@ func NewHtmlStripProcessor() *HtmlStripProcessor { return r } -// true - type HtmlStripProcessorVariant interface { HtmlStripProcessorCaster() *HtmlStripProcessor } diff --git a/typedapi/types/http.go b/typedapi/types/http.go index 89ce7ea982..aa4dc7680a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Http type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L669-L688 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7fd5f23ae0..6c3e505a62 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HttpEmailAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L218-L222 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L218-L222 type HttpEmailAttachment struct { ContentType *string `json:"content_type,omitempty"` Inline *bool `json:"inline,omitempty"` @@ -96,8 +96,6 @@ func NewHttpEmailAttachment() *HttpEmailAttachment { return r } -// true - type HttpEmailAttachmentVariant interface { HttpEmailAttachmentCaster() *HttpEmailAttachment } diff --git a/typedapi/types/httpheaders.go b/typedapi/types/httpheaders.go index 20f131f125..3e058cdbd4 100644 --- a/typedapi/types/httpheaders.go +++ b/typedapi/types/httpheaders.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // HttpHeaders type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L155-L155 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L155-L155 type HttpHeaders map[string][]string type HttpHeadersVariant interface { diff --git a/typedapi/types/httpinput.go b/typedapi/types/httpinput.go index 22cef7f6a2..c1dc45ca79 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // HttpInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L44-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L44-L48 type HttpInput struct { Extract []string `json:"extract,omitempty"` Request *HttpInputRequestDefinition `json:"request,omitempty"` @@ -40,8 +40,6 @@ func NewHttpInput() *HttpInput { return r } -// true - type HttpInputVariant interface { HttpInputCaster() *HttpInput } diff --git a/typedapi/types/httpinputauthentication.go b/typedapi/types/httpinputauthentication.go index 55bc356ba1..8d88fb0301 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // HttpInputAuthentication type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L50-L52 type HttpInputAuthentication struct { Basic HttpInputBasicAuthentication `json:"basic"` } @@ -34,8 +34,6 @@ func NewHttpInputAuthentication() *HttpInputAuthentication { return r } -// true - type HttpInputAuthenticationVariant interface { HttpInputAuthenticationCaster() *HttpInputAuthentication } diff --git a/typedapi/types/httpinputbasicauthentication.go b/typedapi/types/httpinputbasicauthentication.go index 8d8157dacf..74d24765ff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // HttpInputBasicAuthentication type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L54-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L54-L57 type HttpInputBasicAuthentication struct { Password string `json:"password"` Username string `json:"username"` @@ -73,8 +73,6 @@ func NewHttpInputBasicAuthentication() *HttpInputBasicAuthentication { return r } -// true - type HttpInputBasicAuthenticationVariant interface { HttpInputBasicAuthenticationCaster() *HttpInputBasicAuthentication } diff --git a/typedapi/types/httpinputproxy.go b/typedapi/types/httpinputproxy.go index d395761b9e..0f66604c07 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // HttpInputProxy type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L67-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L67-L70 type HttpInputProxy struct { Host string `json:"host"` Port uint `json:"port"` @@ -73,8 +73,6 @@ func NewHttpInputProxy() *HttpInputProxy { return r } -// true - type HttpInputProxyVariant interface { HttpInputProxyCaster() *HttpInputProxy } diff --git a/typedapi/types/httpinputrequestdefinition.go b/typedapi/types/httpinputrequestdefinition.go index 4e85dcf75f..99105fce17 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // HttpInputRequestDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L72-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L72-L86 type HttpInputRequestDefinition struct { Auth *HttpInputAuthentication `json:"auth,omitempty"` Body *string `json:"body,omitempty"` @@ -173,8 +173,6 @@ func NewHttpInputRequestDefinition() *HttpInputRequestDefinition { return r } -// true - type HttpInputRequestDefinitionVariant interface { HttpInputRequestDefinitionCaster() *HttpInputRequestDefinition } diff --git a/typedapi/types/httpinputrequestresult.go b/typedapi/types/httpinputrequestresult.go index deb1a98330..20f2530c26 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // HttpInputRequestResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L300-L300 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 724bf9a18a..dff7a2e5ea 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HttpInputResponseResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L302-L306 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1af6db7c82..8c78ed6c4e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // HttpRoute type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L690-L693 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ee15b8c54f..64f60ab822 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HttpRouteRequests type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L695-L699 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9e02e2f49b..ad376254fc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HttpRouteResponses type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L701-L706 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 988b6c2fdf..71e73790c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // HuggingFaceServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L869-L890 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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) @@ -108,8 +141,6 @@ func NewHuggingFaceServiceSettings() *HuggingFaceServiceSettings { return r } -// true - type HuggingFaceServiceSettingsVariant interface { HuggingFaceServiceSettingsCaster() *HuggingFaceServiceSettings } diff --git a/typedapi/types/huggingfacetasksettings.go b/typedapi/types/huggingfacetasksettings.go new file mode 100644 index 0000000000..2c5c19f9d6 --- /dev/null +++ b/typedapi/types/huggingfacetasksettings.go @@ -0,0 +1,106 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// HuggingFaceTaskSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type HuggingFaceTaskSettingsVariant interface { + HuggingFaceTaskSettingsCaster() *HuggingFaceTaskSettings +} + +func (s *HuggingFaceTaskSettings) HuggingFaceTaskSettingsCaster() *HuggingFaceTaskSettings { + return s +} diff --git a/typedapi/types/hungariananalyzer.go b/typedapi/types/hungariananalyzer.go index 45ada07c17..dd8431e959 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // HungarianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L206-L211 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L206-L211 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": @@ -119,8 +108,6 @@ func NewHungarianAnalyzer() *HungarianAnalyzer { return r } -// true - type HungarianAnalyzerVariant interface { HungarianAnalyzerCaster() *HungarianAnalyzer } @@ -128,3 +115,8 @@ type HungarianAnalyzerVariant interface { func (s *HungarianAnalyzer) HungarianAnalyzerCaster() *HungarianAnalyzer { return s } + +func (s *HungarianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/hunspelltokenfilter.go b/typedapi/types/hunspelltokenfilter.go index dd12aae41d..670b8fcfd6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,23 @@ import ( // HunspellTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L201-L207 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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) @@ -147,8 +159,6 @@ func NewHunspellTokenFilter() *HunspellTokenFilter { return r } -// true - type HunspellTokenFilterVariant interface { HunspellTokenFilterCaster() *HunspellTokenFilter } @@ -156,3 +166,8 @@ type HunspellTokenFilterVariant interface { func (s *HunspellTokenFilter) HunspellTokenFilterCaster() *HunspellTokenFilter { return s } + +func (s *HunspellTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/hyperparameter.go b/typedapi/types/hyperparameter.go index 433372b858..f2b5134988 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Hyperparameter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L274-L288 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 219a65c9a3..dc07b3408c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Hyperparameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L420-L526 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 259e72e4f8..dd3a02273e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,17 +31,42 @@ import ( // HyphenationDecompounderTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L57-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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, @@ -192,8 +247,6 @@ func NewHyphenationDecompounderTokenFilter() *HyphenationDecompounderTokenFilter return r } -// true - type HyphenationDecompounderTokenFilterVariant interface { HyphenationDecompounderTokenFilterCaster() *HyphenationDecompounderTokenFilter } @@ -201,3 +254,8 @@ type HyphenationDecompounderTokenFilterVariant interface { func (s *HyphenationDecompounderTokenFilter) HyphenationDecompounderTokenFilterCaster() *HyphenationDecompounderTokenFilter { return s } + +func (s *HyphenationDecompounderTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/icuanalyzer.go b/typedapi/types/icuanalyzer.go index 9d5d6132d8..4e424ff8ae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,7 +29,7 @@ import ( // IcuAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L67-L71 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L68-L72 type IcuAnalyzer struct { Method icunormalizationtype.IcuNormalizationType `json:"method"` Mode icunormalizationmode.IcuNormalizationMode `json:"mode"` @@ -57,8 +57,6 @@ func NewIcuAnalyzer() *IcuAnalyzer { return r } -// true - type IcuAnalyzerVariant interface { IcuAnalyzerCaster() *IcuAnalyzer } @@ -66,3 +64,8 @@ type IcuAnalyzerVariant interface { func (s *IcuAnalyzer) IcuAnalyzerCaster() *IcuAnalyzer { return s } + +func (s *IcuAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/icucollationproperty.go b/typedapi/types/icucollationproperty.go index 2370c03cc1..4a5c1206b0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -39,7 +39,7 @@ import ( // IcuCollationProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/specialized.ts#L103-L127 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -1053,8 +1065,6 @@ func NewIcuCollationProperty() *IcuCollationProperty { return r } -// true - type IcuCollationPropertyVariant interface { IcuCollationPropertyCaster() *IcuCollationProperty } @@ -1062,3 +1072,8 @@ type IcuCollationPropertyVariant interface { func (s *IcuCollationProperty) IcuCollationPropertyCaster() *IcuCollationProperty { return s } + +func (s *IcuCollationProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/icucollationtokenfilter.go b/typedapi/types/icucollationtokenfilter.go index 47e8573393..e313bc4238 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,20 +36,20 @@ import ( // IcuCollationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L51-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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) @@ -238,8 +238,6 @@ func NewIcuCollationTokenFilter() *IcuCollationTokenFilter { return r } -// true - type IcuCollationTokenFilterVariant interface { IcuCollationTokenFilterCaster() *IcuCollationTokenFilter } @@ -247,3 +245,8 @@ type IcuCollationTokenFilterVariant interface { func (s *IcuCollationTokenFilter) IcuCollationTokenFilterCaster() *IcuCollationTokenFilter { return s } + +func (s *IcuCollationTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/icufoldingtokenfilter.go b/typedapi/types/icufoldingtokenfilter.go index 1a8cfad902..946c2e08db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IcuFoldingTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L46-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L47-L50 type IcuFoldingTokenFilter struct { Type string `json:"type,omitempty"` UnicodeSetFilter string `json:"unicode_set_filter"` @@ -101,8 +101,6 @@ func NewIcuFoldingTokenFilter() *IcuFoldingTokenFilter { return r } -// true - type IcuFoldingTokenFilterVariant interface { IcuFoldingTokenFilterCaster() *IcuFoldingTokenFilter } @@ -110,3 +108,8 @@ type IcuFoldingTokenFilterVariant interface { func (s *IcuFoldingTokenFilter) IcuFoldingTokenFilterCaster() *IcuFoldingTokenFilter { return s } + +func (s *IcuFoldingTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/icunormalizationcharfilter.go b/typedapi/types/icunormalizationcharfilter.go index 4bb21cab10..047268a464 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,6 +26,7 @@ import ( "errors" "fmt" "io" + "strconv" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/icunormalizationmode" "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/icunormalizationtype" @@ -33,12 +34,13 @@ import ( // IcuNormalizationCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L40-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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" @@ -103,8 +118,6 @@ func NewIcuNormalizationCharFilter() *IcuNormalizationCharFilter { return r } -// true - type IcuNormalizationCharFilterVariant interface { IcuNormalizationCharFilterCaster() *IcuNormalizationCharFilter } @@ -112,3 +125,8 @@ type IcuNormalizationCharFilterVariant interface { func (s *IcuNormalizationCharFilter) IcuNormalizationCharFilterCaster() *IcuNormalizationCharFilter { return s } + +func (s *IcuNormalizationCharFilter) CharFilterDefinitionCaster() *CharFilterDefinition { + o := CharFilterDefinition(s) + return &o +} diff --git a/typedapi/types/icunormalizationtokenfilter.go b/typedapi/types/icunormalizationtokenfilter.go index 9ee36b9946..db9805840e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // IcuNormalizationTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L35-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L35-L38 type IcuNormalizationTokenFilter struct { Name icunormalizationtype.IcuNormalizationType `json:"name"` Type string `json:"type,omitempty"` @@ -95,8 +95,6 @@ func NewIcuNormalizationTokenFilter() *IcuNormalizationTokenFilter { return r } -// true - type IcuNormalizationTokenFilterVariant interface { IcuNormalizationTokenFilterCaster() *IcuNormalizationTokenFilter } @@ -104,3 +102,8 @@ type IcuNormalizationTokenFilterVariant interface { func (s *IcuNormalizationTokenFilter) IcuNormalizationTokenFilterCaster() *IcuNormalizationTokenFilter { return s } + +func (s *IcuNormalizationTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/icutokenizer.go b/typedapi/types/icutokenizer.go index 7a5e6a33da..5a6eb19585 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IcuTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L30-L33 type IcuTokenizer struct { RuleFiles string `json:"rule_files"` Type string `json:"type,omitempty"` @@ -101,8 +101,6 @@ func NewIcuTokenizer() *IcuTokenizer { return r } -// true - type IcuTokenizerVariant interface { IcuTokenizerCaster() *IcuTokenizer } @@ -110,3 +108,8 @@ type IcuTokenizerVariant interface { func (s *IcuTokenizer) IcuTokenizerCaster() *IcuTokenizer { return s } + +func (s *IcuTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/icutransformtokenfilter.go b/typedapi/types/icutransformtokenfilter.go index 5ed28c7b7a..fea3dc3e05 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // IcuTransformTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/icu-plugin.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/icu-plugin.ts#L24-L28 type IcuTransformTokenFilter struct { Dir *icutransformdirection.IcuTransformDirection `json:"dir,omitempty"` Id string `json:"id"` @@ -110,8 +110,6 @@ func NewIcuTransformTokenFilter() *IcuTransformTokenFilter { return r } -// true - type IcuTransformTokenFilterVariant interface { IcuTransformTokenFilterCaster() *IcuTransformTokenFilter } @@ -119,3 +117,8 @@ type IcuTransformTokenFilterVariant interface { func (s *IcuTransformTokenFilter) IcuTransformTokenFilterCaster() *IcuTransformTokenFilter { return s } + +func (s *IcuTransformTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/ids.go b/typedapi/types/ids.go index 389a7e637f..db9da36662 100644 --- a/typedapi/types/ids.go +++ b/typedapi/types/ids.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Ids type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L56-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L56-L56 type Ids []string type IdsVariant interface { diff --git a/typedapi/types/idsquery.go b/typedapi/types/idsquery.go index 2f5c3e22d0..f7f7c27e1d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IdsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L88-L96 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -115,8 +115,6 @@ func NewIdsQuery() *IdsQuery { return r } -// true - type IdsQueryVariant interface { IdsQueryCaster() *IdsQuery } diff --git a/typedapi/types/ilm.go b/typedapi/types/ilm.go index 8ffb7b2624..c8ad0bcd4b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Ilm type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L172-L175 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 56cb4b5b7b..da1137b9f4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IlmActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L39-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L39-L93 type IlmActions struct { // Allocate Phases allowed: warm, cold. Allocate *AllocateAction `json:"allocate,omitempty"` @@ -59,8 +59,6 @@ func NewIlmActions() *IlmActions { return r } -// true - type IlmActionsVariant interface { IlmActionsCaster() *IlmActions } diff --git a/typedapi/types/ilmindicator.go b/typedapi/types/ilmindicator.go index 63dd789727..18cd08aea0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // IlmIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L164-L168 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L165-L169 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 2f6bae133d..da6682047f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // IlmIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L169-L173 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L170-L174 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 c78dfbeb55..89e813dfcc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IlmPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Policy.ts#L23-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Policy.ts#L23-L29 type IlmPolicy struct { // Meta_ Arbitrary metadata that is not automatically generated or used by // Elasticsearch. @@ -75,8 +75,6 @@ func NewIlmPolicy() *IlmPolicy { return r } -// true - type IlmPolicyVariant interface { IlmPolicyCaster() *IlmPolicy } diff --git a/typedapi/types/ilmpolicystatistics.go b/typedapi/types/ilmpolicystatistics.go index c80b5f9097..e0e9d349f5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IlmPolicyStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L167-L170 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9c6fa5ba9c..7bcb9dd374 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // Impact type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L67-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L68-L73 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 93899a0d84..2027e3b74c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // IncludedInValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L73-L76 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L73-L76 type IncludedInValidation struct { Constraint []ScalarValue `json:"constraint"` Type string `json:"type,omitempty"` @@ -52,8 +52,6 @@ func NewIncludedInValidation() *IncludedInValidation { return r } -// true - type IncludedInValidationVariant interface { IncludedInValidationCaster() *IncludedInValidation } @@ -61,3 +59,8 @@ type IncludedInValidationVariant interface { func (s *IncludedInValidation) IncludedInValidationCaster() *IncludedInValidation { return s } + +func (s *IncludedInValidation) ValidationCaster() *Validation { + o := Validation(s) + return &o +} diff --git a/typedapi/types/indexaction.go b/typedapi/types/indexaction.go index 33a1765d38..ebf85a2240 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // IndexAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L256-L265 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L256-L265 type IndexAction struct { DocId *string `json:"doc_id,omitempty"` ExecutionTimeField *string `json:"execution_time_field,omitempty"` @@ -100,8 +100,6 @@ func NewIndexAction() *IndexAction { return r } -// true - type IndexActionVariant interface { IndexActionCaster() *IndexAction } diff --git a/typedapi/types/indexaliases.go b/typedapi/types/indexaliases.go index 26560359c8..288878f11a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IndexAliases type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_alias/IndicesGetAliasResponse.ts#L37-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 42d00a054d..87e11893e3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IndexAndDataStreamAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/modify_data_stream/types.ts#L39-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/modify_data_stream/types.ts#L39-L44 type IndexAndDataStreamAction struct { // DataStream Data stream targeted by the action. DataStream string `json:"data_stream"` @@ -75,8 +75,6 @@ func NewIndexAndDataStreamAction() *IndexAndDataStreamAction { return r } -// true - type IndexAndDataStreamActionVariant interface { IndexAndDataStreamActionCaster() *IndexAndDataStreamAction } diff --git a/typedapi/types/indexcapabilities.go b/typedapi/types/indexcapabilities.go index fcd7d34f7e..3cf703c83c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IndexCapabilities type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_rollup_index_caps/types.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4a8478e4a4..0efb65f08b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndexDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotIndexDetails.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7992b42f31..aefcee39e1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndexField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/meta-fields.ts#L46-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L46-L48 type IndexField struct { Enabled bool `json:"enabled"` } @@ -77,8 +77,6 @@ func NewIndexField() *IndexField { return r } -// true - type IndexFieldVariant interface { IndexFieldCaster() *IndexField } diff --git a/typedapi/types/indexhealthstats.go b/typedapi/types/indexhealthstats.go index 465e47da66..a9394b9d54 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // IndexHealthStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/health/types.ts#L24-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 072cc150c5..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/cbfcc73d01310bed2a480ec35aaef98138b598e5 - -package types - -import ( - "bytes" - "encoding/json" - "errors" - "fmt" - "io" - "strconv" -) - -// IndexingPressureMemorySummary type. -// -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/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 6c77a6e377..f39cf9186d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndexingSlowlogSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L588-L593 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L603-L608 type IndexingSlowlogSettings struct { Level *string `json:"level,omitempty"` Reformat *bool `json:"reformat,omitempty"` @@ -113,8 +113,6 @@ func NewIndexingSlowlogSettings() *IndexingSlowlogSettings { return r } -// true - type IndexingSlowlogSettingsVariant interface { IndexingSlowlogSettingsCaster() *IndexingSlowlogSettings } diff --git a/typedapi/types/indexingslowlogtresholds.go b/typedapi/types/indexingslowlogtresholds.go index 4717855bc8..b410d0dd08 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IndexingSlowlogTresholds type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L595-L602 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L610-L617 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`. @@ -37,8 +37,6 @@ func NewIndexingSlowlogTresholds() *IndexingSlowlogTresholds { return r } -// true - type IndexingSlowlogTresholdsVariant interface { IndexingSlowlogTresholdsCaster() *IndexingSlowlogTresholds } diff --git a/typedapi/types/indexingstats.go b/typedapi/types/indexingstats.go index f2177a83d1..4350c285b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndexingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L146-L164 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L168-L186 type IndexingStats struct { DeleteCurrent int64 `json:"delete_current"` DeleteTime Duration `json:"delete_time,omitempty"` @@ -270,5 +270,3 @@ func NewIndexingStats() *IndexingStats { return r } - -// false diff --git a/typedapi/types/indexmappingrecord.go b/typedapi/types/indexmappingrecord.go index cb041eec82..98dd6b209b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IndexMappingRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_mapping/IndicesGetMappingResponse.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3fcc44fdc9..fb9b0b2b07 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // IndexOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/bulk/types.ts#L142-L142 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -170,8 +170,6 @@ func NewIndexOperation() *IndexOperation { return r } -// true - type IndexOperationVariant interface { IndexOperationCaster() *IndexOperation } diff --git a/typedapi/types/indexprivilegescheck.go b/typedapi/types/indexprivilegescheck.go index b1a25a3b9e..1275524125 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // IndexPrivilegesCheck type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/has_privileges/types.ts#L34-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -112,8 +112,6 @@ func NewIndexPrivilegesCheck() *IndexPrivilegesCheck { return r } -// true - type IndexPrivilegesCheckVariant interface { IndexPrivilegesCheckCaster() *IndexPrivilegesCheck } diff --git a/typedapi/types/indexresult.go b/typedapi/types/indexresult.go index 01daa7d2fb..e3903ca0e9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IndexResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L267-L269 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 55c0f03d61..dc4dc4a653 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // IndexResultSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L271-L277 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8891a88930..5a1732d297 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IndexRouting type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexRouting.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L22-L25 type IndexRouting struct { Allocation *IndexRoutingAllocation `json:"allocation,omitempty"` Rebalance *IndexRoutingRebalance `json:"rebalance,omitempty"` @@ -35,8 +35,6 @@ func NewIndexRouting() *IndexRouting { return r } -// true - type IndexRoutingVariant interface { IndexRoutingCaster() *IndexRouting } diff --git a/typedapi/types/indexroutingallocation.go b/typedapi/types/indexroutingallocation.go index b037a6ddde..77eafbe674 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // IndexRoutingAllocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexRouting.ts#L27-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L27-L32 type IndexRoutingAllocation struct { Disk *IndexRoutingAllocationDisk `json:"disk,omitempty"` Enable *indexroutingallocationoptions.IndexRoutingAllocationOptions `json:"enable,omitempty"` @@ -41,8 +41,6 @@ func NewIndexRoutingAllocation() *IndexRoutingAllocation { return r } -// true - type IndexRoutingAllocationVariant interface { IndexRoutingAllocationCaster() *IndexRoutingAllocation } diff --git a/typedapi/types/indexroutingallocationdisk.go b/typedapi/types/indexroutingallocationdisk.go index a9346106e3..b615f07593 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,9 +31,9 @@ import ( // IndexRoutingAllocationDisk type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexRouting.ts#L62-L64 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 } } @@ -75,8 +75,6 @@ func NewIndexRoutingAllocationDisk() *IndexRoutingAllocationDisk { return r } -// true - type IndexRoutingAllocationDiskVariant interface { IndexRoutingAllocationDiskCaster() *IndexRoutingAllocationDisk } diff --git a/typedapi/types/indexroutingallocationinclude.go b/typedapi/types/indexroutingallocationinclude.go index 52e91ae7ba..41327a2e46 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndexRoutingAllocationInclude type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexRouting.ts#L52-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L52-L55 type IndexRoutingAllocationInclude struct { Id_ *string `json:"_id,omitempty"` TierPreference_ *string `json:"_tier_preference,omitempty"` @@ -81,8 +81,6 @@ func NewIndexRoutingAllocationInclude() *IndexRoutingAllocationInclude { return r } -// true - type IndexRoutingAllocationIncludeVariant interface { IndexRoutingAllocationIncludeCaster() *IndexRoutingAllocationInclude } diff --git a/typedapi/types/indexroutingallocationinitialrecovery.go b/typedapi/types/indexroutingallocationinitialrecovery.go index b84f6ce40c..c6a6d2ab1d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IndexRoutingAllocationInitialRecovery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexRouting.ts#L57-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L57-L59 type IndexRoutingAllocationInitialRecovery struct { Id_ *string `json:"_id,omitempty"` } @@ -67,8 +67,6 @@ func NewIndexRoutingAllocationInitialRecovery() *IndexRoutingAllocationInitialRe return r } -// true - type IndexRoutingAllocationInitialRecoveryVariant interface { IndexRoutingAllocationInitialRecoveryCaster() *IndexRoutingAllocationInitialRecovery } diff --git a/typedapi/types/indexroutingrebalance.go b/typedapi/types/indexroutingrebalance.go index f15deb7572..d6b2f8eafe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // IndexRoutingRebalance type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexRouting.ts#L34-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexRouting.ts#L34-L36 type IndexRoutingRebalance struct { Enable indexroutingrebalanceoptions.IndexRoutingRebalanceOptions `json:"enable"` } @@ -38,8 +38,6 @@ func NewIndexRoutingRebalance() *IndexRoutingRebalance { return r } -// true - type IndexRoutingRebalanceVariant interface { IndexRoutingRebalanceCaster() *IndexRoutingRebalance } diff --git a/typedapi/types/indexsegment.go b/typedapi/types/indexsegment.go index 90164aa530..6afb3062e6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IndexSegment type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/segments/types.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 522692111d..20a4763938 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // IndexSegmentSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSegmentSort.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSegmentSort.ts#L22-L27 type IndexSegmentSort struct { Field []string `json:"field,omitempty"` Missing []segmentsortmissing.SegmentSortMissing `json:"missing,omitempty"` @@ -133,8 +133,6 @@ func NewIndexSegmentSort() *IndexSegmentSort { return r } -// true - type IndexSegmentSortVariant interface { IndexSegmentSortCaster() *IndexSegmentSort } diff --git a/typedapi/types/indexsettingblocks.go b/typedapi/types/indexsettingblocks.go index 1b065f90b1..7f7563933c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IndexSettingBlocks type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L262-L268 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L264-L270 type IndexSettingBlocks struct { Metadata Stringifiedboolean `json:"metadata,omitempty"` Read Stringifiedboolean `json:"read,omitempty"` @@ -91,8 +91,6 @@ func NewIndexSettingBlocks() *IndexSettingBlocks { return r } -// true - type IndexSettingBlocksVariant interface { IndexSettingBlocksCaster() *IndexSettingBlocks } diff --git a/typedapi/types/indexsettingresults.go b/typedapi/types/indexsettingresults.go new file mode 100644 index 0000000000..f4e620a634 --- /dev/null +++ b/typedapi/types/indexsettingresults.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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +// IndexSettingResults type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L57-L69 +type IndexSettingResults struct { + // AppliedToDataStreamAndBackingIndices The list of settings that were applied to the data stream and to all of its + // backing indices. These settings will + // also be applied to the write index the next time the data stream is rolled + // over. + AppliedToDataStreamAndBackingIndices []string `json:"applied_to_data_stream_and_backing_indices"` + // AppliedToDataStreamOnly The list of settings that were applied to the data stream but not to backing + // indices. These will be applied to + // the write index the next time the data stream is rolled over. + AppliedToDataStreamOnly []string `json:"applied_to_data_stream_only"` + Errors []DataStreamSettingsError `json:"errors,omitempty"` +} + +// NewIndexSettingResults returns a IndexSettingResults. +func NewIndexSettingResults() *IndexSettingResults { + r := &IndexSettingResults{} + + return r +} diff --git a/typedapi/types/indexsettings.go b/typedapi/types/indexsettings.go index a1859095a6..6c4eb974b6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,11 +33,13 @@ import ( // IndexSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L70-L176 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L70-L178 type IndexSettings struct { Analysis *IndexSettingsAnalysis `json:"analysis,omitempty"` // Analyze Settings to define analyzers, tokenizers, token filters and character // filters. + // Refer to the linked documentation for step-by-step examples of updating + // analyzers on existing indices. Analyze *SettingsAnalyze `json:"analyze,omitempty"` AutoExpandReplicas any `json:"auto_expand_replicas,omitempty"` Blocks *IndexSettingBlocks `json:"blocks,omitempty"` @@ -47,9 +49,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 +75,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 +100,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 +186,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 +203,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 +452,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 +480,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 +492,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 +677,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 { @@ -739,8 +741,6 @@ func NewIndexSettings() *IndexSettings { return r } -// true - type IndexSettingsVariant interface { IndexSettingsCaster() *IndexSettings } diff --git a/typedapi/types/indexsettingsanalysis.go b/typedapi/types/indexsettingsanalysis.go index 01b6f687a0..ac2acc7663 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IndexSettingsAnalysis type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L333-L339 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L346-L352 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 { @@ -917,8 +1079,6 @@ func NewIndexSettingsAnalysis() *IndexSettingsAnalysis { return r } -// true - type IndexSettingsAnalysisVariant interface { IndexSettingsAnalysisCaster() *IndexSettingsAnalysis } diff --git a/typedapi/types/indexsettingslifecycle.go b/typedapi/types/indexsettingslifecycle.go index 93818e4c8e..ae645bc194 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndexSettingsLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L284-L323 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L297-L336 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 @@ -163,8 +163,6 @@ func NewIndexSettingsLifecycle() *IndexSettingsLifecycle { return r } -// true - type IndexSettingsLifecycleVariant interface { IndexSettingsLifecycleCaster() *IndexSettingsLifecycle } diff --git a/typedapi/types/indexsettingslifecyclestep.go b/typedapi/types/indexsettingslifecyclestep.go index e854d75184..4508a04e9c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IndexSettingsLifecycleStep type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L325-L331 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L338-L344 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). @@ -70,8 +70,6 @@ func NewIndexSettingsLifecycleStep() *IndexSettingsLifecycleStep { return r } -// true - type IndexSettingsLifecycleStepVariant interface { IndexSettingsLifecycleStepCaster() *IndexSettingsLifecycleStep } diff --git a/typedapi/types/indexsettingstimeseries.go b/typedapi/types/indexsettingstimeseries.go index 5eea759dd9..07f5c4c90b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IndexSettingsTimeSeries type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L341-L344 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L354-L357 type IndexSettingsTimeSeries struct { EndTime DateTime `json:"end_time,omitempty"` StartTime DateTime `json:"start_time,omitempty"` @@ -73,8 +73,6 @@ func NewIndexSettingsTimeSeries() *IndexSettingsTimeSeries { return r } -// true - type IndexSettingsTimeSeriesVariant interface { IndexSettingsTimeSeriesCaster() *IndexSettingsTimeSeries } diff --git a/typedapi/types/indexstate.go b/typedapi/types/indexstate.go index 1a45380949..e9d9acdc3d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IndexState type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexState.ts#L27-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexState.ts#L27-L40 type IndexState struct { Aliases map[string]Alias `json:"aliases,omitempty"` DataStream *string `json:"data_stream,omitempty"` @@ -104,8 +104,6 @@ func NewIndexState() *IndexState { return r } -// true - type IndexStateVariant interface { IndexStateCaster() *IndexState } diff --git a/typedapi/types/indexstats.go b/typedapi/types/indexstats.go index b638bccc84..a24113e3fb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IndexStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L52-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6ecdcaa240..f42cd0040f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndexTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexTemplate.ts#L28-L81 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexTemplate.ts#L29-L82 type IndexTemplate struct { AllowAutoCreate *bool `json:"allow_auto_create,omitempty"` // ComposedOf An ordered list of component template names. @@ -198,8 +198,6 @@ func NewIndexTemplate() *IndexTemplate { return r } -// true - type IndexTemplateVariant interface { IndexTemplateCaster() *IndexTemplate } diff --git a/typedapi/types/indextemplatedatastreamconfiguration.go b/typedapi/types/indextemplatedatastreamconfiguration.go index fbd3362917..45102d7f59 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndexTemplateDataStreamConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexTemplate.ts#L83-L94 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexTemplate.ts#L84-L95 type IndexTemplateDataStreamConfiguration struct { // AllowCustomRouting If true, the data stream supports custom routing. AllowCustomRouting *bool `json:"allow_custom_routing,omitempty"` @@ -94,8 +94,6 @@ func NewIndexTemplateDataStreamConfiguration() *IndexTemplateDataStreamConfigura return r } -// true - type IndexTemplateDataStreamConfigurationVariant interface { IndexTemplateDataStreamConfigurationCaster() *IndexTemplateDataStreamConfiguration } diff --git a/typedapi/types/indextemplateitem.go b/typedapi/types/indextemplateitem.go index 163cb48abb..1b6f38322e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IndexTemplateItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_index_template/IndicesGetIndexTemplateResponse.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 17e967da21..d116bc1af8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IndexTemplateMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/put_index_template/IndicesPutIndexTemplateRequest.ts#L159-L181 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -49,8 +49,6 @@ func NewIndexTemplateMapping() *IndexTemplateMapping { return r } -// true - type IndexTemplateMappingVariant interface { IndexTemplateMappingCaster() *IndexTemplateMapping } diff --git a/typedapi/types/indextemplatesummary.go b/typedapi/types/indextemplatesummary.go index f208aaeb4a..3d0cc75abe 100644 --- a/typedapi/types/indextemplatesummary.go +++ b/typedapi/types/indextemplatesummary.go @@ -16,13 +16,21 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + // IndexTemplateSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexTemplate.ts#L96-L118 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexTemplate.ts#L97-L124 type IndexTemplateSummary struct { // Aliases Aliases to add. // If the index template includes a `data_stream` object, these are data stream @@ -30,8 +38,9 @@ type IndexTemplateSummary struct { // Otherwise, these are index aliases. // Data stream aliases ignore the `index_routing`, `routing`, and // `search_routing` options. - Aliases map[string]Alias `json:"aliases,omitempty"` - Lifecycle *DataStreamLifecycleWithRollover `json:"lifecycle,omitempty"` + Aliases map[string]Alias `json:"aliases,omitempty"` + DataStreamOptions *DataStreamOptionsTemplate `json:"data_stream_options,omitempty"` + Lifecycle *DataStreamLifecycleWithRollover `json:"lifecycle,omitempty"` // Mappings Mapping for fields in the index. // If specified, this mapping can include field names, field data types, and // mapping parameters. @@ -40,6 +49,54 @@ type IndexTemplateSummary struct { Settings *IndexSettings `json:"settings,omitempty"` } +func (s *IndexTemplateSummary) 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 "aliases": + if s.Aliases == nil { + s.Aliases = make(map[string]Alias, 0) + } + if err := dec.Decode(&s.Aliases); err != nil { + return fmt.Errorf("%s | %w", "Aliases", err) + } + + case "data_stream_options": + if err := dec.Decode(&s.DataStreamOptions); err != nil { + return fmt.Errorf("%s | %w", "DataStreamOptions", err) + } + + case "lifecycle": + if err := dec.Decode(&s.Lifecycle); err != nil { + return fmt.Errorf("%s | %w", "Lifecycle", err) + } + + case "mappings": + if err := dec.Decode(&s.Mappings); err != nil { + return fmt.Errorf("%s | %w", "Mappings", err) + } + + case "settings": + if err := dec.Decode(&s.Settings); err != nil { + return fmt.Errorf("%s | %w", "Settings", err) + } + + } + } + return nil +} + // NewIndexTemplateSummary returns a IndexTemplateSummary. func NewIndexTemplateSummary() *IndexTemplateSummary { r := &IndexTemplateSummary{ @@ -49,8 +106,6 @@ func NewIndexTemplateSummary() *IndexTemplateSummary { return r } -// true - type IndexTemplateSummaryVariant interface { IndexTemplateSummaryCaster() *IndexTemplateSummary } diff --git a/typedapi/types/indexversioning.go b/typedapi/types/indexversioning.go index 80e4f69d5d..c29e17d10a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndexVersioning type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L279-L282 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L292-L295 type IndexVersioning struct { Created *string `json:"created,omitempty"` CreatedString *string `json:"created_string,omitempty"` @@ -81,8 +81,6 @@ func NewIndexVersioning() *IndexVersioning { return r } -// true - type IndexVersioningVariant interface { IndexVersioningCaster() *IndexVersioning } diff --git a/typedapi/types/indicatornode.go b/typedapi/types/indicatornode.go index ca43ec9bf4..5999fea07b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndicatorNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L92-L95 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L93-L96 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 b64c677bbd..fc5f5fcc51 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Indicators type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L32-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L33-L43 type Indicators struct { DataStreamLifecycle *DataStreamLifecycleIndicator `json:"data_stream_lifecycle,omitempty"` Disk *DiskIndicator `json:"disk,omitempty"` @@ -41,5 +41,3 @@ func NewIndicators() *Indicators { return r } - -// false diff --git a/typedapi/types/indices.go b/typedapi/types/indices.go index 2f9d9562ca..60dd6d50b2 100644 --- a/typedapi/types/indices.go +++ b/typedapi/types/indices.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Indices type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L61-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L61-L61 type Indices []string type IndicesVariant interface { diff --git a/typedapi/types/indicesaction.go b/typedapi/types/indicesaction.go index 49d13773ad..57c10506e0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // IndicesAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/update_aliases/types.ts#L23-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -78,8 +78,6 @@ func NewIndicesAction() *IndicesAction { return r } -// true - type IndicesActionVariant interface { IndicesActionCaster() *IndicesAction } diff --git a/typedapi/types/indicesindexingpressure.go b/typedapi/types/indicesindexingpressure.go index 65d21e58d9..7e175cadad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IndicesIndexingPressure type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L575-L577 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L590-L592 type IndicesIndexingPressure struct { Memory IndicesIndexingPressureMemory `json:"memory"` } @@ -34,8 +34,6 @@ func NewIndicesIndexingPressure() *IndicesIndexingPressure { return r } -// true - type IndicesIndexingPressureVariant interface { IndicesIndexingPressureCaster() *IndicesIndexingPressure } diff --git a/typedapi/types/indicesindexingpressurememory.go b/typedapi/types/indicesindexingpressurememory.go index 12aa79d2b7..c79c7be916 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndicesIndexingPressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L579-L586 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L594-L601 type IndicesIndexingPressureMemory struct { // Limit Number of outstanding bytes that may be consumed by indexing requests. When // this limit is reached or exceeded, @@ -84,8 +84,6 @@ func NewIndicesIndexingPressureMemory() *IndicesIndexingPressureMemory { return r } -// true - type IndicesIndexingPressureMemoryVariant interface { IndicesIndexingPressureMemoryCaster() *IndicesIndexingPressureMemory } diff --git a/typedapi/types/indicesmodifyaction.go b/typedapi/types/indicesmodifyaction.go index 442e6cca18..a804a2f78c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // IndicesModifyAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/modify_data_stream/types.ts#L22-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -80,8 +80,6 @@ func NewIndicesModifyAction() *IndicesModifyAction { return r } -// true - type IndicesModifyActionVariant interface { IndicesModifyActionCaster() *IndicesModifyAction } diff --git a/typedapi/types/indicesoptions.go b/typedapi/types/indicesoptions.go index a9a5895a4c..b8c142ac82 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // IndicesOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L332-L359 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L334-L361 type IndicesOptions struct { // AllowNoIndices If false, the request returns an error if any wildcard expression, index // alias, or `_all` value targets only @@ -139,8 +139,6 @@ func NewIndicesOptions() *IndicesOptions { return r } -// true - type IndicesOptionsVariant interface { IndicesOptionsCaster() *IndicesOptions } diff --git a/typedapi/types/indicesprivileges.go b/typedapi/types/indicesprivileges.go index 2c54609b3f..cf82867cac 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // IndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L218-L244 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L218-L244 type IndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited @@ -168,8 +168,6 @@ func NewIndicesPrivileges() *IndicesPrivileges { return r } -// true - type IndicesPrivilegesVariant interface { IndicesPrivilegesCaster() *IndicesPrivileges } diff --git a/typedapi/types/indicesprivilegesquery.go b/typedapi/types/indicesprivilegesquery.go index d534239f20..5f663bb8e3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ package types // Query // RoleTemplateQuery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L343-L351 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L343-L351 type IndicesPrivilegesQuery any type IndicesPrivilegesQueryVariant interface { diff --git a/typedapi/types/indicesrecord.go b/typedapi/types/indicesrecord.go index f3daf2e55e..8e9fcfab1d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndicesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/indices/types.ts#L20-L808 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f5734a551c..fa36b11b84 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IndicesShardsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L53-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L53-L56 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 e02a3f3d7b..0725cd7157 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // IndicesShardStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L192-L223 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 06b3e44b61..b49a10afbe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IndicesShardStores type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/shard_stores/types.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 683a57e6ea..dd65ebccea 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // IndicesStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L95-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6cf1525944..58ac0014be 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IndicesValidationExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/validate_query/IndicesValidateQueryResponse.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 14fea893ee..2b8a147aa8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,13 @@ import ( // IndicesVersions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L263-L268 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..4aac007c42 --- /dev/null +++ b/typedapi/types/indicnormalizationtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// IndicNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type IndicNormalizationTokenFilterVariant interface { + IndicNormalizationTokenFilterCaster() *IndicNormalizationTokenFilter +} + +func (s *IndicNormalizationTokenFilter) IndicNormalizationTokenFilterCaster() *IndicNormalizationTokenFilter { + return s +} + +func (s *IndicNormalizationTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/indonesiananalyzer.go b/typedapi/types/indonesiananalyzer.go index 3fcbfaa4a0..2a69565917 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // IndonesianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L213-L218 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L213-L218 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": @@ -119,8 +108,6 @@ func NewIndonesianAnalyzer() *IndonesianAnalyzer { return r } -// true - type IndonesianAnalyzerVariant interface { IndonesianAnalyzerCaster() *IndonesianAnalyzer } @@ -128,3 +115,8 @@ type IndonesianAnalyzerVariant interface { func (s *IndonesianAnalyzer) IndonesianAnalyzerCaster() *IndonesianAnalyzer { return s } + +func (s *IndonesianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/inferenceaggregate.go b/typedapi/types/inferenceaggregate.go index a094f2f23d..674759b81d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InferenceAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L755-L770 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6af4dd614e..7fff7faadd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // InferenceAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L225-L234 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -108,8 +108,6 @@ func NewInferenceAggregation() *InferenceAggregation { return r } -// true - type InferenceAggregationVariant interface { InferenceAggregationCaster() *InferenceAggregation } diff --git a/typedapi/types/inferencechunkingsettings.go b/typedapi/types/inferencechunkingsettings.go index 294457e5ba..565cc506a4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InferenceChunkingSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/Services.ts#L60-L89 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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` @@ -136,8 +136,6 @@ func NewInferenceChunkingSettings() *InferenceChunkingSettings { return r } -// true - type InferenceChunkingSettingsVariant interface { InferenceChunkingSettingsCaster() *InferenceChunkingSettings } diff --git a/typedapi/types/inferenceclassimportance.go b/typedapi/types/inferenceclassimportance.go index 6aabfc6502..dd169b689d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InferenceClassImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L784-L787 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f3f329528a..fda4760114 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // InferenceConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1067-L1079 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1067-L1079 type InferenceConfig struct { AdditionalInferenceConfigProperty map[string]json.RawMessage `json:"-"` // Classification Classification configuration for inference. @@ -74,8 +74,6 @@ func NewInferenceConfig() *InferenceConfig { return r } -// true - type InferenceConfigVariant interface { InferenceConfigCaster() *InferenceConfig } diff --git a/typedapi/types/inferenceconfigclassification.go b/typedapi/types/inferenceconfigclassification.go index e0a2b95bad..543a134030 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InferenceConfigClassification type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1094-L1120 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1094-L1120 type InferenceConfigClassification struct { // NumTopClasses Specifies the number of top class predictions to return. NumTopClasses *int `json:"num_top_classes,omitempty"` @@ -128,8 +128,6 @@ func NewInferenceConfigClassification() *InferenceConfigClassification { return r } -// true - type InferenceConfigClassificationVariant interface { InferenceConfigClassificationCaster() *InferenceConfigClassification } diff --git a/typedapi/types/inferenceconfigcontainer.go b/typedapi/types/inferenceconfigcontainer.go index 5f2dc7a81d..653b1ddc2e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // InferenceConfigContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L236-L242 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L236-L242 type InferenceConfigContainer struct { AdditionalInferenceConfigContainerProperty map[string]json.RawMessage `json:"-"` // Classification Classification configuration for inference. @@ -74,8 +74,6 @@ func NewInferenceConfigContainer() *InferenceConfigContainer { return r } -// true - type InferenceConfigContainerVariant interface { InferenceConfigContainerCaster() *InferenceConfigContainer } diff --git a/typedapi/types/inferenceconfigcreatecontainer.go b/typedapi/types/inferenceconfigcreatecontainer.go index 5c02585e9a..6420845478 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // InferenceConfigCreateContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L26-L85 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L26-L85 type InferenceConfigCreateContainer struct { AdditionalInferenceConfigCreateContainerProperty map[string]json.RawMessage `json:"-"` // Classification Classification configuration for inference. @@ -91,8 +91,6 @@ func NewInferenceConfigCreateContainer() *InferenceConfigCreateContainer { return r } -// true - type InferenceConfigCreateContainerVariant interface { InferenceConfigCreateContainerCaster() *InferenceConfigCreateContainer } diff --git a/typedapi/types/inferenceconfigregression.go b/typedapi/types/inferenceconfigregression.go index 847497bb25..3bec130700 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InferenceConfigRegression type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1081-L1092 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1081-L1092 type InferenceConfigRegression struct { // NumTopFeatureImportanceValues Specifies the maximum number of feature importance values per document. NumTopFeatureImportanceValues *int `json:"num_top_feature_importance_values,omitempty"` @@ -88,8 +88,6 @@ func NewInferenceConfigRegression() *InferenceConfigRegression { return r } -// true - type InferenceConfigRegressionVariant interface { InferenceConfigRegressionCaster() *InferenceConfigRegression } diff --git a/typedapi/types/inferenceconfigupdatecontainer.go b/typedapi/types/inferenceconfigupdatecontainer.go index 97eca87a98..8305cb0e5f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // InferenceConfigUpdateContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L315-L337 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L315-L337 type InferenceConfigUpdateContainer struct { AdditionalInferenceConfigUpdateContainerProperty map[string]json.RawMessage `json:"-"` // Classification Classification configuration for inference. @@ -90,8 +90,6 @@ func NewInferenceConfigUpdateContainer() *InferenceConfigUpdateContainer { return r } -// true - type InferenceConfigUpdateContainerVariant interface { InferenceConfigUpdateContainerCaster() *InferenceConfigUpdateContainer } diff --git a/typedapi/types/inferenceendpoint.go b/typedapi/types/inferenceendpoint.go index 8336be77f0..c8cfb2fba4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InferenceEndpoint type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/Services.ts#L24-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/Services.ts#L45-L65 type InferenceEndpoint struct { // ChunkingSettings Chunking configuration object ChunkingSettings *InferenceChunkingSettings `json:"chunking_settings,omitempty"` @@ -97,8 +97,6 @@ func NewInferenceEndpoint() *InferenceEndpoint { return r } -// true - type InferenceEndpointVariant interface { InferenceEndpointCaster() *InferenceEndpoint } diff --git a/typedapi/types/inferenceendpointinfo.go b/typedapi/types/inferenceendpointinfo.go index 9df1cbe507..f969872e6c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // InferenceEndpointInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/Services.ts#L46-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d68445ad9e..6621fdfcfe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InferenceFeatureImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L778-L782 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 776060538c..75194e0d85 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InferenceProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1028-L1060 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1028-L1060 type InferenceProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -197,8 +197,6 @@ func NewInferenceProcessor() *InferenceProcessor { return r } -// true - type InferenceProcessorVariant interface { InferenceProcessorCaster() *InferenceProcessor } diff --git a/typedapi/types/inferenceresponseresult.go b/typedapi/types/inferenceresponseresult.go index c6acaac753..78f769ebf9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InferenceResponseResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L478-L526 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eb09c66851..9fa08a9f9b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InferenceTopClassEntry type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L772-L776 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3033c6a382..63fa9222c2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Influence type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Anomaly.ts#L141-L144 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 37fa42eb84..f81fa341a0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Influencer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Influencer.ts#L24-L76 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 20aca40887..090e7a8bd8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InfoFeatureState type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotInfoFeatureState.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8dd0a275b5..bbdee69d76 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Ingest type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Simulation.ts#L29-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2bddf1a69c..7610768830 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IngestDocumentSimulation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/simulate/ingest/SimulateIngestResponse.ts#L35-L78 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 412a3f9df7..2d678beb30 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IngestPipeline type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Pipeline.ts#L23-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -125,8 +125,6 @@ func NewIngestPipeline() *IngestPipeline { return r } -// true - type IngestPipelineVariant interface { IngestPipelineCaster() *IngestPipeline } diff --git a/typedapi/types/ingestpipelineparams.go b/typedapi/types/ingestpipelineparams.go index 9a857ce74b..5f0c500f45 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IngestPipelineParams type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L148-L153 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L148-L153 type IngestPipelineParams struct { ExtractBinaryContent bool `json:"extract_binary_content"` Name string `json:"name"` @@ -120,8 +120,6 @@ func NewIngestPipelineParams() *IngestPipelineParams { return r } -// true - type IngestPipelineParamsVariant interface { IngestPipelineParamsCaster() *IngestPipelineParams } diff --git a/typedapi/types/ingeststats.go b/typedapi/types/ingeststats.go index 21a6491fba..7b469df3d6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IngestStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L356-L394 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a98d6a2a4a..b7ef2ef3c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IngestTotal type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L396-L413 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2f5234b701..390b8eddef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InlineGet type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L317-L330 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L319-L332 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 8b3c03bf23..7bc916e3a1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InlineGetDictUserDefined type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L317-L330 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L319-L332 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 366fd40805..2c1d6f5738 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InnerHits type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/hits.ts#L107-L141 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L107-L141 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 { @@ -300,8 +289,6 @@ func NewInnerHits() *InnerHits { return r } -// true - type InnerHitsVariant interface { InnerHitsCaster() *InnerHits } diff --git a/typedapi/types/innerhitsresult.go b/typedapi/types/innerhitsresult.go index 3dab5ca808..a64ae6ee61 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // InnerHitsResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/hits.ts#L85-L87 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L85-L87 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..a25fc5efa0 --- /dev/null +++ b/typedapi/types/innerretriever.go @@ -0,0 +1,102 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/scorenormalizer" +) + +// InnerRetriever type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type InnerRetrieverVariant interface { + InnerRetrieverCaster() *InnerRetriever +} + +func (s *InnerRetriever) InnerRetrieverCaster() *InnerRetriever { + return s +} diff --git a/typedapi/types/inprogress.go b/typedapi/types/inprogress.go index 019ecee06e..0fb13da1e9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/_types/SnapshotLifecycle.ts#L141-L146 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c5b8962407..1c261a451a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Input type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/types.ts#L56-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L56-L58 type Input struct { FieldNames []string `json:"field_names"` } @@ -78,8 +78,6 @@ func NewInput() *Input { return r } -// true - type InputVariant interface { InputCaster() *Input } diff --git a/typedapi/types/inputconfig.go b/typedapi/types/inputconfig.go index e0ed6a48da..cfcb8071d0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // InputConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1062-L1065 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1062-L1065 type InputConfig struct { InputField string `json:"input_field"` OutputField string `json:"output_field"` @@ -88,8 +88,6 @@ func NewInputConfig() *InputConfig { return r } -// true - type InputConfigVariant interface { InputConfigCaster() *InputConfig } diff --git a/typedapi/types/integernumberproperty.go b/typedapi/types/integernumberproperty.go index e58fe1c634..f638cc820c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // IntegerNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L171-L174 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L172-L175 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 { @@ -973,8 +985,6 @@ func NewIntegerNumberProperty() *IntegerNumberProperty { return r } -// true - type IntegerNumberPropertyVariant interface { IntegerNumberPropertyCaster() *IntegerNumberProperty } @@ -982,3 +992,8 @@ type IntegerNumberPropertyVariant interface { func (s *IntegerNumberProperty) IntegerNumberPropertyCaster() *IntegerNumberProperty { return s } + +func (s *IntegerNumberProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/integerrangeproperty.go b/typedapi/types/integerrangeproperty.go index d58241e76e..5dc9d6df7d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // IntegerRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/range.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -896,8 +908,6 @@ func NewIntegerRangeProperty() *IntegerRangeProperty { return r } -// true - type IntegerRangePropertyVariant interface { IntegerRangePropertyCaster() *IntegerRangeProperty } @@ -905,3 +915,8 @@ type IntegerRangePropertyVariant interface { func (s *IntegerRangeProperty) IntegerRangePropertyCaster() *IntegerRangeProperty { return s } + +func (s *IntegerRangeProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/intervals.go b/typedapi/types/intervals.go index 48e196f14a..95cdee325d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // Intervals type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L83-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` } @@ -82,8 +84,6 @@ func NewIntervals() *Intervals { return r } -// true - type IntervalsVariant interface { IntervalsCaster() *Intervals } diff --git a/typedapi/types/intervalsallof.go b/typedapi/types/intervalsallof.go index cc9163a87b..60788f9c6f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IntervalsAllOf type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L50-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L50-L70 type IntervalsAllOf struct { // Filter Rule used to filter returned intervals. Filter *IntervalsFilter `json:"filter,omitempty"` @@ -114,8 +114,6 @@ func NewIntervalsAllOf() *IntervalsAllOf { return r } -// true - type IntervalsAllOfVariant interface { IntervalsAllOfCaster() *IntervalsAllOf } diff --git a/typedapi/types/intervalsanyof.go b/typedapi/types/intervalsanyof.go index 864439cfef..06ec6a9628 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IntervalsAnyOf type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L72-L81 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L72-L81 type IntervalsAnyOf struct { // Filter Rule used to filter returned intervals. Filter *IntervalsFilter `json:"filter,omitempty"` @@ -37,8 +37,6 @@ func NewIntervalsAnyOf() *IntervalsAnyOf { return r } -// true - type IntervalsAnyOfVariant interface { IntervalsAnyOfCaster() *IntervalsAnyOf } diff --git a/typedapi/types/intervalsfilter.go b/typedapi/types/intervalsfilter.go index 2734efe5ad..359fc36b03 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // IntervalsFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L112-L152 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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` @@ -97,8 +97,6 @@ func NewIntervalsFilter() *IntervalsFilter { return r } -// true - type IntervalsFilterVariant interface { IntervalsFilterCaster() *IntervalsFilter } diff --git a/typedapi/types/intervalsfuzzy.go b/typedapi/types/intervalsfuzzy.go index 217c2b9721..3c14878d9a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IntervalsFuzzy type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L154-L184 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L156-L186 type IntervalsFuzzy struct { // Analyzer Analyzer used to normalize the term. Analyzer *string `json:"analyzer,omitempty"` @@ -142,8 +142,6 @@ func NewIntervalsFuzzy() *IntervalsFuzzy { return r } -// true - type IntervalsFuzzyVariant interface { IntervalsFuzzyCaster() *IntervalsFuzzy } diff --git a/typedapi/types/intervalsmatch.go b/typedapi/types/intervalsmatch.go index 74636ab845..30e8300307 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IntervalsMatch type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L186-L216 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -142,8 +142,6 @@ func NewIntervalsMatch() *IntervalsMatch { return r } -// true - type IntervalsMatchVariant interface { IntervalsMatchCaster() *IntervalsMatch } diff --git a/typedapi/types/intervalsprefix.go b/typedapi/types/intervalsprefix.go index e4bc239a3c..06d043453a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IntervalsPrefix type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L218-L233 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L220-L235 type IntervalsPrefix struct { // Analyzer Analyzer used to analyze the `prefix`. Analyzer *string `json:"analyzer,omitempty"` @@ -100,8 +100,6 @@ func NewIntervalsPrefix() *IntervalsPrefix { return r } -// true - type IntervalsPrefixVariant interface { IntervalsPrefixCaster() *IntervalsPrefix } diff --git a/typedapi/types/intervalsquery.go b/typedapi/types/intervalsquery.go index 8fee345256..0b0b9e7046 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IntervalsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L235-L266 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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) @@ -185,8 +197,6 @@ func NewIntervalsQuery() *IntervalsQuery { return r } -// true - type IntervalsQueryVariant interface { IntervalsQueryCaster() *IntervalsQuery } diff --git a/typedapi/types/intervalsrange.go b/typedapi/types/intervalsrange.go new file mode 100644 index 0000000000..4b0f52924f --- /dev/null +++ b/typedapi/types/intervalsrange.go @@ -0,0 +1,151 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// IntervalsRange type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type IntervalsRangeVariant interface { + IntervalsRangeCaster() *IntervalsRange +} + +func (s *IntervalsRange) IntervalsRangeCaster() *IntervalsRange { + return s +} diff --git a/typedapi/types/intervalsregexp.go b/typedapi/types/intervalsregexp.go new file mode 100644 index 0000000000..2e5652435e --- /dev/null +++ b/typedapi/types/intervalsregexp.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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// IntervalsRegexp type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type IntervalsRegexpVariant interface { + IntervalsRegexpCaster() *IntervalsRegexp +} + +func (s *IntervalsRegexp) IntervalsRegexpCaster() *IntervalsRegexp { + return s +} diff --git a/typedapi/types/intervalswildcard.go b/typedapi/types/intervalswildcard.go index efb9cf0897..f37ac2510d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IntervalsWildcard type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L268-L283 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -101,8 +101,6 @@ func NewIntervalsWildcard() *IntervalsWildcard { return r } -// true - type IntervalsWildcardVariant interface { IntervalsWildcardCaster() *IntervalsWildcard } diff --git a/typedapi/types/invertedindex.go b/typedapi/types/invertedindex.go index 20d3fd89da..14f3e84301 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // InvertedIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L69-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L69-L77 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 4654362062..3b076804df 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Invocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/_types/SnapshotLifecycle.ts#L148-L151 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cf86f1c463..e86601a3ad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Invocations type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L41-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5dba6233ab..ff74227c7e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IoStatDevice type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L801-L826 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d319676453..6d0e610e6a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // IoStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L789-L799 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 361e26eed6..d20a28ae75 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IpFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L177-L180 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9398b16852..4507788479 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Ipinfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Database.ts#L59-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Database.ts#L59-L59 type Ipinfo struct { } @@ -33,8 +33,6 @@ func NewIpinfo() *Ipinfo { return r } -// true - type IpinfoVariant interface { IpinfoCaster() *Ipinfo } diff --git a/typedapi/types/iplocationdatabaseconfigurationmetadata.go b/typedapi/types/iplocationdatabaseconfigurationmetadata.go index 9345e78430..96e8c52497 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IpLocationDatabaseConfigurationMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/get_ip_location_database/GetIpLocationDatabaseResponse.ts#L28-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 41f0bd088f..7541afc152 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IpLocationProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L479-L513 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L479-L513 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 @@ -214,8 +214,6 @@ func NewIpLocationProcessor() *IpLocationProcessor { return r } -// true - type IpLocationProcessorVariant interface { IpLocationProcessorCaster() *IpLocationProcessor } diff --git a/typedapi/types/ipprefixaggregate.go b/typedapi/types/ipprefixaggregate.go index 93cdf5c917..665497eae3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IpPrefixAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L709-L713 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 06eb750876..da624ef19e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IpPrefixAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1196-L1225 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -157,8 +157,6 @@ func NewIpPrefixAggregation() *IpPrefixAggregation { return r } -// true - type IpPrefixAggregationVariant interface { IpPrefixAggregationCaster() *IpPrefixAggregation } diff --git a/typedapi/types/ipprefixbucket.go b/typedapi/types/ipprefixbucket.go index 7dd71bd820..af652695cd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // IpPrefixBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L715-L720 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7abca84706..5c9c58e4f4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // IpProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/specialized.ts#L74-L88 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -943,8 +955,6 @@ func NewIpProperty() *IpProperty { return r } -// true - type IpPropertyVariant interface { IpPropertyCaster() *IpProperty } @@ -952,3 +962,8 @@ type IpPropertyVariant interface { func (s *IpProperty) IpPropertyCaster() *IpProperty { return s } + +func (s *IpProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/iprangeaggregate.go b/typedapi/types/iprangeaggregate.go index 9058656e01..a713870818 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IpRangeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L624-L629 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 990a8fe89c..7442bc03b9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // IpRangeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L567-L576 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -75,8 +75,6 @@ func NewIpRangeAggregation() *IpRangeAggregation { return r } -// true - type IpRangeAggregationVariant interface { IpRangeAggregationCaster() *IpRangeAggregation } diff --git a/typedapi/types/iprangeaggregationrange.go b/typedapi/types/iprangeaggregationrange.go index ec33be99c9..3d6450730a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // IpRangeAggregationRange type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L578-L591 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L578-L591 type IpRangeAggregationRange struct { // From Start of the range. From *string `json:"from,omitempty"` @@ -104,8 +104,6 @@ func NewIpRangeAggregationRange() *IpRangeAggregationRange { return r } -// true - type IpRangeAggregationRangeVariant interface { IpRangeAggregationRangeCaster() *IpRangeAggregationRange } diff --git a/typedapi/types/iprangebucket.go b/typedapi/types/iprangebucket.go index 79c973df3f..980a5b5508 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // IpRangeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L631-L635 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1cf1508b39..e88f207dce 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // IpRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/range.ts#L46-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -896,8 +908,6 @@ func NewIpRangeProperty() *IpRangeProperty { return r } -// true - type IpRangePropertyVariant interface { IpRangePropertyCaster() *IpRangeProperty } @@ -905,3 +915,8 @@ type IpRangePropertyVariant interface { func (s *IpRangeProperty) IpRangePropertyCaster() *IpRangeProperty { return s } + +func (s *IpRangeProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/irishanalyzer.go b/typedapi/types/irishanalyzer.go index 57f55e09f2..b3d7bd0f4d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // IrishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L220-L225 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L220-L225 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": @@ -119,8 +108,6 @@ func NewIrishAnalyzer() *IrishAnalyzer { return r } -// true - type IrishAnalyzerVariant interface { IrishAnalyzerCaster() *IrishAnalyzer } @@ -128,3 +115,8 @@ type IrishAnalyzerVariant interface { func (s *IrishAnalyzer) IrishAnalyzerCaster() *IrishAnalyzer { return s } + +func (s *IrishAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/italiananalyzer.go b/typedapi/types/italiananalyzer.go index fd6268275f..a175a8fa63 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // ItalianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L227-L232 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L227-L232 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": @@ -119,8 +108,6 @@ func NewItalianAnalyzer() *ItalianAnalyzer { return r } -// true - type ItalianAnalyzerVariant interface { ItalianAnalyzerCaster() *ItalianAnalyzer } @@ -128,3 +115,8 @@ type ItalianAnalyzerVariant interface { func (s *ItalianAnalyzer) ItalianAnalyzerCaster() *ItalianAnalyzer { return s } + +func (s *ItalianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/jastoptokenfilter.go b/typedapi/types/jastoptokenfilter.go new file mode 100644 index 0000000000..ced70c596d --- /dev/null +++ b/typedapi/types/jastoptokenfilter.go @@ -0,0 +1,107 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// JaStopTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type JaStopTokenFilterVariant interface { + JaStopTokenFilterCaster() *JaStopTokenFilter +} + +func (s *JaStopTokenFilter) JaStopTokenFilterCaster() *JaStopTokenFilter { + return s +} + +func (s *JaStopTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/jinaaiservicesettings.go b/typedapi/types/jinaaiservicesettings.go index 47ba4f00cd..c9f099fb03 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // JinaAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L900-L929 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1439-L1468 type JinaAIServiceSettings struct { // ApiKey A valid API key of your JinaAI account. // @@ -122,8 +122,6 @@ func NewJinaAIServiceSettings() *JinaAIServiceSettings { return r } -// true - type JinaAIServiceSettingsVariant interface { JinaAIServiceSettingsCaster() *JinaAIServiceSettings } diff --git a/typedapi/types/jinaaitasksettings.go b/typedapi/types/jinaaitasksettings.go index d5c3d91385..1f04cc5a89 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // JinaAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L931-L952 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -116,8 +116,6 @@ func NewJinaAITaskSettings() *JinaAITaskSettings { return r } -// true - type JinaAITaskSettingsVariant interface { JinaAITaskSettingsCaster() *JinaAITaskSettings } diff --git a/typedapi/types/job.go b/typedapi/types/job.go index 0f8f199e77..7f235e50ae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Job type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Job.ts#L61-L180 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 816ef0c8f9..ae287d9109 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,10 +32,10 @@ import ( // JobBlocked type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Job.ts#L392-L395 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Job.ts#L392-L395 type JobBlocked struct { Reason jobblockedreason.JobBlockedReason `json:"reason"` - TaskId TaskId `json:"task_id,omitempty"` + TaskId *string `json:"task_id,omitempty"` } func (s *JobBlocked) UnmarshalJSON(data []byte) error { @@ -74,5 +74,3 @@ func NewJobBlocked() *JobBlocked { return r } - -// false diff --git a/typedapi/types/jobconfig.go b/typedapi/types/jobconfig.go index de479a99d0..71c763ad95 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // JobConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Job.ts#L182-L283 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -294,8 +294,6 @@ func NewJobConfig() *JobConfig { return r } -// true - type JobConfigVariant interface { JobConfigCaster() *JobConfig } diff --git a/typedapi/types/jobforecaststatistics.go b/typedapi/types/jobforecaststatistics.go index 8df7ff3a57..bea44cba53 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // JobForecastStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Job.ts#L343-L350 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2c5eff16ca..9c299f6cf5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // JobsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/ml_jobs/types.ts#L24-L347 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0d0fe54929..8ef5b3cbe8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // JobStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Job.ts#L54-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1d48f876b6..e03c45405c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // JobStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Job.ts#L284-L330 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2978f8c010..073ba3b8d0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // JobTimingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Job.ts#L332-L341 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 240e7c429b..4aadb74db6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // JobUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L370-L376 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L370-L376 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 dc04af203d..718208ed7c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // JoinProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1122-L1137 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1122-L1137 type JoinProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -151,8 +151,6 @@ func NewJoinProcessor() *JoinProcessor { return r } -// true - type JoinProcessorVariant interface { JoinProcessorCaster() *JoinProcessor } diff --git a/typedapi/types/joinproperty.go b/typedapi/types/joinproperty.go index 047aa423b9..b7b746d187 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // JoinProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L102-L106 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L103-L107 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 { @@ -840,8 +852,6 @@ func NewJoinProperty() *JoinProperty { return r } -// true - type JoinPropertyVariant interface { JoinPropertyCaster() *JoinProperty } @@ -849,3 +859,8 @@ type JoinPropertyVariant interface { func (s *JoinProperty) JoinPropertyCaster() *JoinProperty { return s } + +func (s *JoinProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/jsonprocessor.go b/typedapi/types/jsonprocessor.go index 87a859a0ee..a54a0c2daf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // JsonProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1139-L1168 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1139-L1168 type JsonProcessor struct { // AddToRoot Flag that forces the parsed JSON to be added at the top level of the // document. @@ -185,8 +185,6 @@ func NewJsonProcessor() *JsonProcessor { return r } -// true - type JsonProcessorVariant interface { JsonProcessorCaster() *JsonProcessor } diff --git a/typedapi/types/jvm.go b/typedapi/types/jvm.go index a49ef34a7a..a26134268e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Jvm type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L882-L916 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e32d9c24ea..86d7b30338 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // JvmClasses type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L979-L992 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a81f84784e..997072d8d1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,10 +31,12 @@ import ( // JvmMemoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L918-L947 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b2019a9d47..5f365ab922 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // JvmStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_memory_stats/types.ts#L50-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2038eadd17..59c20f2ef5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // JvmThreads type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L968-L977 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a6e47267fa..89f334d968 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,12 +32,14 @@ import ( // KeepTypesTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L219-L223 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -102,8 +104,6 @@ func NewKeepTypesTokenFilter() *KeepTypesTokenFilter { return r } -// true - type KeepTypesTokenFilterVariant interface { KeepTypesTokenFilterCaster() *KeepTypesTokenFilter } @@ -111,3 +111,8 @@ type KeepTypesTokenFilterVariant interface { func (s *KeepTypesTokenFilter) KeepTypesTokenFilterCaster() *KeepTypesTokenFilter { return s } + +func (s *KeepTypesTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/keepwordstokenfilter.go b/typedapi/types/keepwordstokenfilter.go index ba9e72837e..d8d2c9cf2f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,13 +31,23 @@ import ( // KeepWordsTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L225-L230 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -124,8 +134,6 @@ func NewKeepWordsTokenFilter() *KeepWordsTokenFilter { return r } -// true - type KeepWordsTokenFilterVariant interface { KeepWordsTokenFilterCaster() *KeepWordsTokenFilter } @@ -133,3 +141,8 @@ type KeepWordsTokenFilterVariant interface { func (s *KeepWordsTokenFilter) KeepWordsTokenFilterCaster() *KeepWordsTokenFilter { return s } + +func (s *KeepWordsTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/keyedpercentiles.go b/typedapi/types/keyedpercentiles.go index 712884a82a..8e91065994 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // KeyedPercentiles type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L160-L160 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1748ae31d6..9753c57390 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KeyedProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L415-L418 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9ea4d5e07c..8de5dc37f0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KeyValueProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1177-L1229 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1177-L1229 type KeyValueProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -259,8 +259,6 @@ func NewKeyValueProcessor() *KeyValueProcessor { return r } -// true - type KeyValueProcessorVariant interface { KeyValueProcessorCaster() *KeyValueProcessor } diff --git a/typedapi/types/keywordanalyzer.go b/typedapi/types/keywordanalyzer.go index 8391d27750..fcfc7e404a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // KeywordAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L66-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L66-L70 type KeywordAnalyzer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -86,8 +86,6 @@ func NewKeywordAnalyzer() *KeywordAnalyzer { return r } -// true - type KeywordAnalyzerVariant interface { KeywordAnalyzerCaster() *KeywordAnalyzer } @@ -95,3 +93,8 @@ type KeywordAnalyzerVariant interface { func (s *KeywordAnalyzer) KeywordAnalyzerCaster() *KeywordAnalyzer { return s } + +func (s *KeywordAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/keywordmarkertokenfilter.go b/typedapi/types/keywordmarkertokenfilter.go index efff97963c..de654692a9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,14 +31,30 @@ import ( // KeywordMarkerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L232-L238 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -149,8 +165,6 @@ func NewKeywordMarkerTokenFilter() *KeywordMarkerTokenFilter { return r } -// true - type KeywordMarkerTokenFilterVariant interface { KeywordMarkerTokenFilterCaster() *KeywordMarkerTokenFilter } @@ -158,3 +172,8 @@ type KeywordMarkerTokenFilterVariant interface { func (s *KeywordMarkerTokenFilter) KeywordMarkerTokenFilterCaster() *KeywordMarkerTokenFilter { return s } + +func (s *KeywordMarkerTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/keywordproperty.go b/typedapi/types/keywordproperty.go index 5fbc0ba951..6586755d98 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // KeywordProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L108-L127 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L109-L128 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 { @@ -1011,8 +1023,6 @@ func NewKeywordProperty() *KeywordProperty { return r } -// true - type KeywordPropertyVariant interface { KeywordPropertyCaster() *KeywordProperty } @@ -1020,3 +1030,8 @@ type KeywordPropertyVariant interface { func (s *KeywordProperty) KeywordPropertyCaster() *KeywordProperty { return s } + +func (s *KeywordProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/keywordrepeattokenfilter.go b/typedapi/types/keywordrepeattokenfilter.go new file mode 100644 index 0000000000..01fb646140 --- /dev/null +++ b/typedapi/types/keywordrepeattokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// KeywordRepeatTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type KeywordRepeatTokenFilterVariant interface { + KeywordRepeatTokenFilterCaster() *KeywordRepeatTokenFilter +} + +func (s *KeywordRepeatTokenFilter) KeywordRepeatTokenFilterCaster() *KeywordRepeatTokenFilter { + return s +} + +func (s *KeywordRepeatTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/keywordtokenizer.go b/typedapi/types/keywordtokenizer.go index e2c22c1af6..9a9971844b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KeywordTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L68-L74 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L69-L75 type KeywordTokenizer struct { BufferSize *int `json:"buffer_size,omitempty"` Type string `json:"type,omitempty"` @@ -105,8 +105,6 @@ func NewKeywordTokenizer() *KeywordTokenizer { return r } -// true - type KeywordTokenizerVariant interface { KeywordTokenizerCaster() *KeywordTokenizer } @@ -114,3 +112,8 @@ type KeywordTokenizerVariant interface { func (s *KeywordTokenizer) KeywordTokenizerCaster() *KeywordTokenizer { return s } + +func (s *KeywordTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/kibanatoken.go b/typedapi/types/kibanatoken.go index cce46ac174..3a10c3769f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KibanaToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/enroll_kibana/Response.ts#L31-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 15fef3c9c6..c30b43a869 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KnnCollectorResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L222-L228 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0515d84437..9e9b871088 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KnnQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Knn.ts#L64-L87 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Knn.ts#L64-L87 type KnnQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -198,8 +198,6 @@ func NewKnnQuery() *KnnQuery { return r } -// true - type KnnQueryVariant interface { KnnQueryCaster() *KnnQuery } diff --git a/typedapi/types/knnqueryprofilebreakdown.go b/typedapi/types/knnqueryprofilebreakdown.go index f10382b773..63d6d56d77 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KnnQueryProfileBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L199-L220 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d811bcd212..2cffc2f487 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KnnQueryProfileResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L188-L196 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 074a13bd72..a59cdb9ace 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KnnRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Retriever.ts#L64-L82 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -190,8 +204,6 @@ func NewKnnRetriever() *KnnRetriever { return r } -// true - type KnnRetrieverVariant interface { KnnRetrieverCaster() *KnnRetriever } diff --git a/typedapi/types/knnsearch.go b/typedapi/types/knnsearch.go index dd0e443b10..e6f05a1f55 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KnnSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Knn.ts#L35-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Knn.ts#L35-L62 type KnnSearch struct { // Boost Boost value to apply to kNN scores Boost *float32 `json:"boost,omitempty"` @@ -188,8 +188,6 @@ func NewKnnSearch() *KnnSearch { return r } -// true - type KnnSearchVariant interface { KnnSearchCaster() *KnnSearch } diff --git a/typedapi/types/kstemtokenfilter.go b/typedapi/types/kstemtokenfilter.go index 01d84b3dd6..67bac279d2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // KStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L240-L242 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L324-L326 type KStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -86,8 +86,6 @@ func NewKStemTokenFilter() *KStemTokenFilter { return r } -// true - type KStemTokenFilterVariant interface { KStemTokenFilterCaster() *KStemTokenFilter } @@ -95,3 +93,8 @@ type KStemTokenFilterVariant interface { func (s *KStemTokenFilter) KStemTokenFilterCaster() *KStemTokenFilter { return s } + +func (s *KStemTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/kuromojianalyzer.go b/typedapi/types/kuromojianalyzer.go index 85583e25ba..594015677d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // KuromojiAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/kuromoji-plugin.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L26-L30 type KuromojiAnalyzer struct { Mode kuromojitokenizationmode.KuromojiTokenizationMode `json:"mode"` Type string `json:"type,omitempty"` @@ -103,8 +103,6 @@ func NewKuromojiAnalyzer() *KuromojiAnalyzer { return r } -// true - type KuromojiAnalyzerVariant interface { KuromojiAnalyzerCaster() *KuromojiAnalyzer } @@ -112,3 +110,8 @@ type KuromojiAnalyzerVariant interface { func (s *KuromojiAnalyzer) KuromojiAnalyzerCaster() *KuromojiAnalyzer { return s } + +func (s *KuromojiAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/kuromojiiterationmarkcharfilter.go b/typedapi/types/kuromojiiterationmarkcharfilter.go index 1f4e613e3d..416c71311e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KuromojiIterationMarkCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/kuromoji-plugin.ts#L31-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L37-L41 type KuromojiIterationMarkCharFilter struct { NormalizeKana bool `json:"normalize_kana"` NormalizeKanji bool `json:"normalize_kanji"` @@ -119,8 +119,6 @@ func NewKuromojiIterationMarkCharFilter() *KuromojiIterationMarkCharFilter { return r } -// true - type KuromojiIterationMarkCharFilterVariant interface { KuromojiIterationMarkCharFilterCaster() *KuromojiIterationMarkCharFilter } @@ -128,3 +126,8 @@ type KuromojiIterationMarkCharFilterVariant interface { func (s *KuromojiIterationMarkCharFilter) KuromojiIterationMarkCharFilterCaster() *KuromojiIterationMarkCharFilter { return s } + +func (s *KuromojiIterationMarkCharFilter) CharFilterDefinitionCaster() *CharFilterDefinition { + o := CharFilterDefinition(s) + return &o +} diff --git a/typedapi/types/kuromojipartofspeechtokenfilter.go b/typedapi/types/kuromojipartofspeechtokenfilter.go index 1fb4de1616..44aae178ba 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // KuromojiPartOfSpeechTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/kuromoji-plugin.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L43-L46 type KuromojiPartOfSpeechTokenFilter struct { Stoptags []string `json:"stoptags"` Type string `json:"type,omitempty"` @@ -93,8 +93,6 @@ func NewKuromojiPartOfSpeechTokenFilter() *KuromojiPartOfSpeechTokenFilter { return r } -// true - type KuromojiPartOfSpeechTokenFilterVariant interface { KuromojiPartOfSpeechTokenFilterCaster() *KuromojiPartOfSpeechTokenFilter } @@ -102,3 +100,8 @@ type KuromojiPartOfSpeechTokenFilterVariant interface { func (s *KuromojiPartOfSpeechTokenFilter) KuromojiPartOfSpeechTokenFilterCaster() *KuromojiPartOfSpeechTokenFilter { return s } + +func (s *KuromojiPartOfSpeechTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/kuromojireadingformtokenfilter.go b/typedapi/types/kuromojireadingformtokenfilter.go index b1ed72123c..7bd4948ae6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KuromojiReadingFormTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/kuromoji-plugin.ts#L42-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L48-L51 type KuromojiReadingFormTokenFilter struct { Type string `json:"type,omitempty"` UseRomaji bool `json:"use_romaji"` @@ -103,8 +103,6 @@ func NewKuromojiReadingFormTokenFilter() *KuromojiReadingFormTokenFilter { return r } -// true - type KuromojiReadingFormTokenFilterVariant interface { KuromojiReadingFormTokenFilterCaster() *KuromojiReadingFormTokenFilter } @@ -112,3 +110,8 @@ type KuromojiReadingFormTokenFilterVariant interface { func (s *KuromojiReadingFormTokenFilter) KuromojiReadingFormTokenFilterCaster() *KuromojiReadingFormTokenFilter { return s } + +func (s *KuromojiReadingFormTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/kuromojistemmertokenfilter.go b/typedapi/types/kuromojistemmertokenfilter.go index 4f5681b49e..a6f04b94a8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // KuromojiStemmerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/kuromoji-plugin.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L53-L56 type KuromojiStemmerTokenFilter struct { MinimumLength int `json:"minimum_length"` Type string `json:"type,omitempty"` @@ -105,8 +105,6 @@ func NewKuromojiStemmerTokenFilter() *KuromojiStemmerTokenFilter { return r } -// true - type KuromojiStemmerTokenFilterVariant interface { KuromojiStemmerTokenFilterCaster() *KuromojiStemmerTokenFilter } @@ -114,3 +112,8 @@ type KuromojiStemmerTokenFilterVariant interface { func (s *KuromojiStemmerTokenFilter) KuromojiStemmerTokenFilterCaster() *KuromojiStemmerTokenFilter { return s } + +func (s *KuromojiStemmerTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/kuromojitokenizer.go b/typedapi/types/kuromojitokenizer.go index d1d117c718..3ff69fbe8a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // KuromojiTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/kuromoji-plugin.ts#L58-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/kuromoji-plugin.ts#L64-L73 type KuromojiTokenizer struct { DiscardCompoundToken *bool `json:"discard_compound_token,omitempty"` DiscardPunctuation *bool `json:"discard_punctuation,omitempty"` @@ -181,8 +181,6 @@ func NewKuromojiTokenizer() *KuromojiTokenizer { return r } -// true - type KuromojiTokenizerVariant interface { KuromojiTokenizerCaster() *KuromojiTokenizer } @@ -190,3 +188,8 @@ type KuromojiTokenizerVariant interface { func (s *KuromojiTokenizer) KuromojiTokenizerCaster() *KuromojiTokenizer { return s } + +func (s *KuromojiTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/languagecontext.go b/typedapi/types/languagecontext.go index dec38fe558..ae5b984cb4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // LanguageContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/get_script_languages/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6adf59fb25..8d7792bdc3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // LaplaceSmoothingModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L431-L436 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L431-L436 type LaplaceSmoothingModel struct { // Alpha A constant that is added to all counts to balance weights. Alpha Float64 `json:"alpha"` @@ -80,8 +80,6 @@ func NewLaplaceSmoothingModel() *LaplaceSmoothingModel { return r } -// true - type LaplaceSmoothingModelVariant interface { LaplaceSmoothingModelCaster() *LaplaceSmoothingModel } diff --git a/typedapi/types/latest.go b/typedapi/types/latest.go index 496a8bc12e..31bf4f78db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Latest type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/_types/Transform.ts#L47-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -75,8 +75,6 @@ func NewLatest() *Latest { return r } -// true - type LatestVariant interface { LatestCaster() *Latest } diff --git a/typedapi/types/latlongeolocation.go b/typedapi/types/latlongeolocation.go index 4fff853c5d..a37699a4ba 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // LatLonGeoLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L120-L129 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L120-L129 type LatLonGeoLocation struct { // Lat Latitude Lat Float64 `json:"lat"` @@ -98,8 +98,6 @@ func NewLatLonGeoLocation() *LatLonGeoLocation { return r } -// true - type LatLonGeoLocationVariant interface { LatLonGeoLocationCaster() *LatLonGeoLocation } @@ -107,3 +105,8 @@ type LatLonGeoLocationVariant interface { func (s *LatLonGeoLocation) LatLonGeoLocationCaster() *LatLonGeoLocation { return s } + +func (s *LatLonGeoLocation) GeoLocationCaster() *GeoLocation { + o := GeoLocation(s) + return &o +} diff --git a/typedapi/types/latviananalyzer.go b/typedapi/types/latviananalyzer.go index 5eee73f25b..f615c1ce67 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // LatvianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L234-L239 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L234-L239 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": @@ -119,8 +108,6 @@ func NewLatvianAnalyzer() *LatvianAnalyzer { return r } -// true - type LatvianAnalyzerVariant interface { LatvianAnalyzerCaster() *LatvianAnalyzer } @@ -128,3 +115,8 @@ type LatvianAnalyzerVariant interface { func (s *LatvianAnalyzer) LatvianAnalyzerCaster() *LatvianAnalyzer { return s } + +func (s *LatvianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/learningtorank.go b/typedapi/types/learningtorank.go index b75371da32..e68ff7528a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // LearningToRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/rescoring.ts#L88-L97 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -88,8 +88,6 @@ func NewLearningToRank() *LearningToRank { return r } -// true - type LearningToRankVariant interface { LearningToRankCaster() *LearningToRank } diff --git a/typedapi/types/learningtorankconfig.go b/typedapi/types/learningtorankconfig.go index 71e225039a..63d0813e7e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // LearningToRankConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L87-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -96,8 +96,6 @@ func NewLearningToRankConfig() *LearningToRankConfig { return r } -// true - type LearningToRankConfigVariant interface { LearningToRankConfigCaster() *LearningToRankConfig } diff --git a/typedapi/types/lengthtokenfilter.go b/typedapi/types/lengthtokenfilter.go index 304d233263..19f48222f3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,9 +31,13 @@ import ( // LengthTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L244-L248 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -123,8 +127,6 @@ func NewLengthTokenFilter() *LengthTokenFilter { return r } -// true - type LengthTokenFilterVariant interface { LengthTokenFilterCaster() *LengthTokenFilter } @@ -132,3 +134,8 @@ type LengthTokenFilterVariant interface { func (s *LengthTokenFilter) LengthTokenFilterCaster() *LengthTokenFilter { return s } + +func (s *LengthTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/lessthanvalidation.go b/typedapi/types/lessthanvalidation.go index 9b4dd4343a..796d87d8aa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // LessThanValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L58-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L58-L61 type LessThanValidation struct { Constraint Float64 `json:"constraint"` Type string `json:"type,omitempty"` @@ -98,8 +98,6 @@ func NewLessThanValidation() *LessThanValidation { return r } -// true - type LessThanValidationVariant interface { LessThanValidationCaster() *LessThanValidation } @@ -107,3 +105,8 @@ type LessThanValidationVariant interface { func (s *LessThanValidation) LessThanValidationCaster() *LessThanValidation { return s } + +func (s *LessThanValidation) ValidationCaster() *Validation { + o := Validation(s) + return &o +} diff --git a/typedapi/types/lettertokenizer.go b/typedapi/types/lettertokenizer.go index 776e17666d..2ad6ad698a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // LetterTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L76-L78 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L77-L79 type LetterTokenizer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -86,8 +86,6 @@ func NewLetterTokenizer() *LetterTokenizer { return r } -// true - type LetterTokenizerVariant interface { LetterTokenizerCaster() *LetterTokenizer } @@ -95,3 +93,8 @@ type LetterTokenizerVariant interface { func (s *LetterTokenizer) LetterTokenizerCaster() *LetterTokenizer { return s } + +func (s *LetterTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/license.go b/typedapi/types/license.go index 85b9d43e1b..d15b82b7e2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // License type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/_types/License.ts#L42-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/license/_types/License.ts#L42-L53 type License struct { ExpiryDateInMillis int64 `json:"expiry_date_in_millis"` IssueDateInMillis int64 `json:"issue_date_in_millis"` @@ -162,8 +162,6 @@ func NewLicense() *License { return r } -// true - type LicenseVariant interface { LicenseCaster() *License } diff --git a/typedapi/types/licenseinformation.go b/typedapi/types/licenseinformation.go index a23b6dcb23..9f364abc5d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // LicenseInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/license/get/types.ts#L25-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 80a2ade29e..8d593ceb85 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Lifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/get_lifecycle/types.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3687d8e0f1..7b8363db9b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // LifecycleExplainManaged // LifecycleExplainUnmanaged // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/explain_lifecycle/types.ts#L64-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/explain_lifecycle/types.ts#L65-L68 type LifecycleExplain any diff --git a/typedapi/types/lifecycleexplainmanaged.go b/typedapi/types/lifecycleexplainmanaged.go index fc84fd474c..170e18eaaf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // LifecycleExplainManaged type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/explain_lifecycle/types.ts#L27-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 02dda6e9f7..6975e0cc4b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // LifecycleExplainPhaseExecution type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/explain_lifecycle/types.ts#L69-L74 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 830123481d..1798f80b62 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // LifecycleExplainUnmanaged type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/explain_lifecycle/types.ts#L59-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c5a1e91965..504521ce5f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // LikeDocument // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L198-L203 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L198-L203 type Like any type LikeVariant interface { diff --git a/typedapi/types/likedocument.go b/typedapi/types/likedocument.go index f7d8b8a5d6..f041439c1e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // LikeDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L174-L196 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -120,8 +120,6 @@ func NewLikeDocument() *LikeDocument { return r } -// true - type LikeDocumentVariant interface { LikeDocumentCaster() *LikeDocument } @@ -129,3 +127,8 @@ type LikeDocumentVariant interface { func (s *LikeDocument) LikeDocumentCaster() *LikeDocument { return s } + +func (s *LikeDocument) LikeCaster() *Like { + o := Like(s) + return &o +} diff --git a/typedapi/types/limits.go b/typedapi/types/limits.go index 412847dae9..d28ef5e4c6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Limits type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/info/types.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 880cdcb5ec..45a945c32f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,16 @@ import ( // LimitTokenCountTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L250-L254 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -110,8 +114,6 @@ func NewLimitTokenCountTokenFilter() *LimitTokenCountTokenFilter { return r } -// true - type LimitTokenCountTokenFilterVariant interface { LimitTokenCountTokenFilterCaster() *LimitTokenCountTokenFilter } @@ -119,3 +121,8 @@ type LimitTokenCountTokenFilterVariant interface { func (s *LimitTokenCountTokenFilter) LimitTokenCountTokenFilterCaster() *LimitTokenCountTokenFilter { return s } + +func (s *LimitTokenCountTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/linearinterpolationsmoothingmodel.go b/typedapi/types/linearinterpolationsmoothingmodel.go index 5f3054054c..56bfe040ff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // LinearInterpolationSmoothingModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L438-L442 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L438-L442 type LinearInterpolationSmoothingModel struct { BigramLambda Float64 `json:"bigram_lambda"` TrigramLambda Float64 `json:"trigram_lambda"` @@ -113,8 +113,6 @@ func NewLinearInterpolationSmoothingModel() *LinearInterpolationSmoothingModel { return r } -// true - type LinearInterpolationSmoothingModelVariant interface { LinearInterpolationSmoothingModelCaster() *LinearInterpolationSmoothingModel } diff --git a/typedapi/types/linearmovingaverageaggregation.go b/typedapi/types/linearmovingaverageaggregation.go index 4280d85f1c..2f1959252e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // LinearMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L268-L271 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -174,8 +174,6 @@ func NewLinearMovingAverageAggregation() *LinearMovingAverageAggregation { return r } -// true - type LinearMovingAverageAggregationVariant interface { LinearMovingAverageAggregationCaster() *LinearMovingAverageAggregation } @@ -183,3 +181,8 @@ type LinearMovingAverageAggregationVariant interface { func (s *LinearMovingAverageAggregation) LinearMovingAverageAggregationCaster() *LinearMovingAverageAggregation { return s } + +func (s *LinearMovingAverageAggregation) MovingAverageAggregationCaster() *MovingAverageAggregation { + o := MovingAverageAggregation(s) + return &o +} diff --git a/typedapi/types/linearretriever.go b/typedapi/types/linearretriever.go new file mode 100644 index 0000000000..4b455fc150 --- /dev/null +++ b/typedapi/types/linearretriever.go @@ -0,0 +1,173 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/scorenormalizer" +) + +// LinearRetriever type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type LinearRetrieverVariant interface { + LinearRetrieverCaster() *LinearRetriever +} + +func (s *LinearRetriever) LinearRetrieverCaster() *LinearRetriever { + return s +} diff --git a/typedapi/types/listtypevalidation.go b/typedapi/types/listtypevalidation.go index a4e9bf6a1e..2808035c7d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ListTypeValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L68-L71 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L68-L71 type ListTypeValidation struct { Constraint string `json:"constraint"` Type string `json:"type,omitempty"` @@ -94,8 +94,6 @@ func NewListTypeValidation() *ListTypeValidation { return r } -// true - type ListTypeValidationVariant interface { ListTypeValidationCaster() *ListTypeValidation } @@ -103,3 +101,8 @@ type ListTypeValidationVariant interface { func (s *ListTypeValidation) ListTypeValidationCaster() *ListTypeValidation { return s } + +func (s *ListTypeValidation) ValidationCaster() *Validation { + o := Validation(s) + return &o +} diff --git a/typedapi/types/lithuaniananalyzer.go b/typedapi/types/lithuaniananalyzer.go index e1a5aeceb0..510442c0ef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // LithuanianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L241-L246 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L241-L246 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": @@ -119,8 +108,6 @@ func NewLithuanianAnalyzer() *LithuanianAnalyzer { return r } -// true - type LithuanianAnalyzerVariant interface { LithuanianAnalyzerCaster() *LithuanianAnalyzer } @@ -128,3 +115,8 @@ type LithuanianAnalyzerVariant interface { func (s *LithuanianAnalyzer) LithuanianAnalyzerCaster() *LithuanianAnalyzer { return s } + +func (s *LithuanianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/local.go b/typedapi/types/local.go index f8454d4a6f..419dda1d05 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Local type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Database.ts#L63-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1b159247c7..0eb0e8b4e2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // LoggingAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L281-L285 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L281-L285 type LoggingAction struct { Category *string `json:"category,omitempty"` Level *string `json:"level,omitempty"` @@ -101,8 +101,6 @@ func NewLoggingAction() *LoggingAction { return r } -// true - type LoggingActionVariant interface { LoggingActionCaster() *LoggingAction } diff --git a/typedapi/types/loggingresult.go b/typedapi/types/loggingresult.go index af46725c57..1166ae3412 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // LoggingResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L287-L289 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 696c85d913..c4e3e15fa0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // LogstashPipeline type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/logstash/_types/Pipeline.ts#L56-L87 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -129,8 +129,6 @@ func NewLogstashPipeline() *LogstashPipeline { return r } -// true - type LogstashPipelineVariant interface { LogstashPipelineCaster() *LogstashPipeline } diff --git a/typedapi/types/longnumberproperty.go b/typedapi/types/longnumberproperty.go index 9d8d45d9c1..263434e4af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // LongNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L176-L179 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L177-L180 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 { @@ -972,8 +984,6 @@ func NewLongNumberProperty() *LongNumberProperty { return r } -// true - type LongNumberPropertyVariant interface { LongNumberPropertyCaster() *LongNumberProperty } @@ -981,3 +991,8 @@ type LongNumberPropertyVariant interface { func (s *LongNumberProperty) LongNumberPropertyCaster() *LongNumberProperty { return s } + +func (s *LongNumberProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/longrangeproperty.go b/typedapi/types/longrangeproperty.go index 379eef1047..2bcc6633b7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // LongRangeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/range.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -896,8 +908,6 @@ func NewLongRangeProperty() *LongRangeProperty { return r } -// true - type LongRangePropertyVariant interface { LongRangePropertyCaster() *LongRangeProperty } @@ -905,3 +915,8 @@ type LongRangePropertyVariant interface { func (s *LongRangeProperty) LongRangePropertyCaster() *LongRangeProperty { return s } + +func (s *LongRangeProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/longraretermsaggregate.go b/typedapi/types/longraretermsaggregate.go index f278b84c0a..82f658f91e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // LongRareTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L471-L476 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8faee1b025..d6cf22929c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // LongRareTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L478-L481 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b43e822350..f8dbc68833 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // LongTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L439-L444 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e8ada1abf9..d3ae5d2588 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // LongTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L446-L449 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 720b3a1ab6..a16f17e24d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // LowercaseNormalizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/normalizers.ts#L26-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/normalizers.ts#L26-L28 type LowercaseNormalizer struct { Type string `json:"type,omitempty"` } @@ -50,8 +50,6 @@ func NewLowercaseNormalizer() *LowercaseNormalizer { return r } -// true - type LowercaseNormalizerVariant interface { LowercaseNormalizerCaster() *LowercaseNormalizer } @@ -59,3 +57,8 @@ type LowercaseNormalizerVariant interface { func (s *LowercaseNormalizer) LowercaseNormalizerCaster() *LowercaseNormalizer { return s } + +func (s *LowercaseNormalizer) NormalizerCaster() *Normalizer { + o := Normalizer(s) + return &o +} diff --git a/typedapi/types/lowercaseprocessor.go b/typedapi/types/lowercaseprocessor.go index 270769f217..c8f00c61fc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // LowercaseProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1231-L1247 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1231-L1247 type LowercaseProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -154,8 +154,6 @@ func NewLowercaseProcessor() *LowercaseProcessor { return r } -// true - type LowercaseProcessorVariant interface { LowercaseProcessorCaster() *LowercaseProcessor } diff --git a/typedapi/types/lowercasetokenfilter.go b/typedapi/types/lowercasetokenfilter.go index b685ba8494..c1a91d0e8f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,16 +26,18 @@ import ( "errors" "fmt" "io" - "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/lowercasetokenfilterlanguages" ) // LowercaseTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L256-L259 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -101,8 +96,6 @@ func NewLowercaseTokenFilter() *LowercaseTokenFilter { return r } -// true - type LowercaseTokenFilterVariant interface { LowercaseTokenFilterCaster() *LowercaseTokenFilter } @@ -110,3 +103,8 @@ type LowercaseTokenFilterVariant interface { func (s *LowercaseTokenFilter) LowercaseTokenFilterCaster() *LowercaseTokenFilter { return s } + +func (s *LowercaseTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/lowercasetokenizer.go b/typedapi/types/lowercasetokenizer.go index 4cd8836dcd..f4c220cf49 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // LowercaseTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L80-L82 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L81-L83 type LowercaseTokenizer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -86,8 +86,6 @@ func NewLowercaseTokenizer() *LowercaseTokenizer { return r } -// true - type LowercaseTokenizerVariant interface { LowercaseTokenizerCaster() *LowercaseTokenizer } @@ -95,3 +93,8 @@ type LowercaseTokenizerVariant interface { func (s *LowercaseTokenizer) LowercaseTokenizerCaster() *LowercaseTokenizer { return s } + +func (s *LowercaseTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/machinelearning.go b/typedapi/types/machinelearning.go index a74fef0949..5f6c2e37a9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MachineLearning type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L378-L385 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L378-L385 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 064236523e..3d2751c15a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ManageUserPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L440-L442 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L440-L442 type ManageUserPrivileges struct { Applications []string `json:"applications"` } @@ -34,8 +34,6 @@ func NewManageUserPrivileges() *ManageUserPrivileges { return r } -// true - type ManageUserPrivilegesVariant interface { ManageUserPrivilegesCaster() *ManageUserPrivileges } diff --git a/typedapi/types/mapboxvectortiles.go b/typedapi/types/mapboxvectortiles.go index e6eceda4d5..d4820726cc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // MapboxVectorTiles type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Binary.ts#L21-L21 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Binary.ts#L21-L21 type MapboxVectorTiles []byte diff --git a/typedapi/types/mappingcharfilter.go b/typedapi/types/mappingcharfilter.go index 08178137a9..498b432578 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MappingCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/char_filters.ts#L51-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/char_filters.ts#L51-L55 type MappingCharFilter struct { Mappings []string `json:"mappings,omitempty"` MappingsPath *string `json:"mappings_path,omitempty"` @@ -108,8 +108,6 @@ func NewMappingCharFilter() *MappingCharFilter { return r } -// true - type MappingCharFilterVariant interface { MappingCharFilterCaster() *MappingCharFilter } @@ -117,3 +115,8 @@ type MappingCharFilterVariant interface { func (s *MappingCharFilter) MappingCharFilterCaster() *MappingCharFilter { return s } + +func (s *MappingCharFilter) CharFilterDefinitionCaster() *CharFilterDefinition { + o := CharFilterDefinition(s) + return &o +} diff --git a/typedapi/types/mappinglimitsettings.go b/typedapi/types/mappinglimitsettings.go index e7695f4463..e4efd106b7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,13 +31,13 @@ import ( // MappingLimitSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L425-L439 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L438-L452 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 { @@ -132,8 +132,6 @@ func NewMappingLimitSettings() *MappingLimitSettings { return r } -// true - type MappingLimitSettingsVariant interface { MappingLimitSettingsCaster() *MappingLimitSettings } diff --git a/typedapi/types/mappinglimitsettingsdepth.go b/typedapi/types/mappinglimitsettingsdepth.go index 1749513b75..8bed6306d1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsDepth type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L460-L467 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L473-L480 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 @@ -82,8 +82,6 @@ func NewMappingLimitSettingsDepth() *MappingLimitSettingsDepth { return r } -// true - type MappingLimitSettingsDepthVariant interface { MappingLimitSettingsDepthCaster() *MappingLimitSettingsDepth } diff --git a/typedapi/types/mappinglimitsettingsdimensionfields.go b/typedapi/types/mappinglimitsettingsdimensionfields.go index 2721be1e70..5e6a9eeef2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsDimensionFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L497-L503 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L510-L516 type MappingLimitSettingsDimensionFields struct { // Limit [preview] This functionality is in technical preview and may be changed or // removed in a future release. @@ -82,8 +82,6 @@ func NewMappingLimitSettingsDimensionFields() *MappingLimitSettingsDimensionFiel return r } -// true - type MappingLimitSettingsDimensionFieldsVariant interface { MappingLimitSettingsDimensionFieldsCaster() *MappingLimitSettingsDimensionFields } diff --git a/typedapi/types/mappinglimitsettingsfieldnamelength.go b/typedapi/types/mappinglimitsettingsfieldnamelength.go index a4010b1cfb..ad68e8d1d4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsFieldNameLength type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L488-L495 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L501-L508 type MappingLimitSettingsFieldNameLength struct { // Limit Setting for the maximum length of a field name. This setting isn’t really // something that addresses mappings explosion but @@ -84,8 +84,6 @@ func NewMappingLimitSettingsFieldNameLength() *MappingLimitSettingsFieldNameLeng return r } -// true - type MappingLimitSettingsFieldNameLengthVariant interface { MappingLimitSettingsFieldNameLengthCaster() *MappingLimitSettingsFieldNameLength } diff --git a/typedapi/types/mappinglimitsettingsnestedfields.go b/typedapi/types/mappinglimitsettingsnestedfields.go index 85cd65d0df..23693b63fe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsNestedFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L469-L477 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L482-L490 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 @@ -83,8 +83,6 @@ func NewMappingLimitSettingsNestedFields() *MappingLimitSettingsNestedFields { return r } -// true - type MappingLimitSettingsNestedFieldsVariant interface { MappingLimitSettingsNestedFieldsCaster() *MappingLimitSettingsNestedFields } diff --git a/typedapi/types/mappinglimitsettingsnestedobjects.go b/typedapi/types/mappinglimitsettingsnestedobjects.go index 9dbb5fec48..385ffafef2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsNestedObjects type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L479-L486 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L492-L499 type MappingLimitSettingsNestedObjects struct { // Limit The maximum number of nested JSON objects that a single document can contain // across all nested types. This limit helps @@ -82,8 +82,6 @@ func NewMappingLimitSettingsNestedObjects() *MappingLimitSettingsNestedObjects { return r } -// true - type MappingLimitSettingsNestedObjectsVariant interface { MappingLimitSettingsNestedObjectsCaster() *MappingLimitSettingsNestedObjects } diff --git a/typedapi/types/mappinglimitsettingssourcefields.go b/typedapi/types/mappinglimitsettingssourcefields.go index 6bc4d0f663..00075694a8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // MappingLimitSettingsSourceFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L505-L507 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L518-L520 type MappingLimitSettingsSourceFields struct { Mode sourcemode.SourceMode `json:"mode"` } @@ -38,8 +38,6 @@ func NewMappingLimitSettingsSourceFields() *MappingLimitSettingsSourceFields { return r } -// true - type MappingLimitSettingsSourceFieldsVariant interface { MappingLimitSettingsSourceFieldsCaster() *MappingLimitSettingsSourceFields } diff --git a/typedapi/types/mappinglimitsettingstotalfields.go b/typedapi/types/mappinglimitsettingstotalfields.go index feefe0a856..21fe3db36f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MappingLimitSettingsTotalFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L441-L458 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L454-L471 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 } } @@ -104,8 +104,6 @@ func NewMappingLimitSettingsTotalFields() *MappingLimitSettingsTotalFields { return r } -// true - type MappingLimitSettingsTotalFieldsVariant interface { MappingLimitSettingsTotalFieldsCaster() *MappingLimitSettingsTotalFields } diff --git a/typedapi/types/mappingstats.go b/typedapi/types/mappingstats.go index a8f23cd115..5dc94a75b2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MappingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L186-L190 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bf3c421a02..a2779682fe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // MasterIsStableIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L81-L85 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L82-L86 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 c125f1bafd..3aa23da0f4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MasterIsStableIndicatorClusterFormationNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L100-L104 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L101-L105 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 bbb416b0b0..50a8572853 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // MasterIsStableIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L86-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L87-L92 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 4954bc04c6..57a6deb9a2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MasterIsStableIndicatorExceptionFetchingHistory type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L96-L99 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L97-L100 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 56a8b3ced2..07422b1265 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MasterRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/master/types.ts#L20-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ace1de8f75..7394510ecc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MatchAllQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/MatchAllQuery.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -97,8 +97,6 @@ func NewMatchAllQuery() *MatchAllQuery { return r } -// true - type MatchAllQueryVariant interface { MatchAllQueryCaster() *MatchAllQuery } diff --git a/typedapi/types/matchboolprefixquery.go b/typedapi/types/matchboolprefixquery.go index 3aaa75b6d5..3eaf24323e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // MatchBoolPrefixQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L355-L412 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -233,8 +233,6 @@ func NewMatchBoolPrefixQuery() *MatchBoolPrefixQuery { return r } -// true - type MatchBoolPrefixQueryVariant interface { MatchBoolPrefixQueryCaster() *MatchBoolPrefixQuery } diff --git a/typedapi/types/matchedfield.go b/typedapi/types/matchedfield.go index 4eec13d87b..a8dd2862a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MatchedField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/test_grok_pattern/types.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9f3e016c3e..d65b324472 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MatchedText type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/test_grok_pattern/types.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ad38c2cb7a..84450cfcf3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MatchNoneQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/MatchNoneQuery.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -97,8 +97,6 @@ func NewMatchNoneQuery() *MatchNoneQuery { return r } -// true - type MatchNoneQueryVariant interface { MatchNoneQueryCaster() *MatchNoneQuery } diff --git a/typedapi/types/matchonlytextproperty.go b/typedapi/types/matchonlytextproperty.go index c559eb844f..1eef9ea2ad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // MatchOnlyTextProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L264-L289 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L282-L307 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 { @@ -450,8 +456,6 @@ func NewMatchOnlyTextProperty() *MatchOnlyTextProperty { return r } -// true - type MatchOnlyTextPropertyVariant interface { MatchOnlyTextPropertyCaster() *MatchOnlyTextProperty } @@ -459,3 +463,8 @@ type MatchOnlyTextPropertyVariant interface { func (s *MatchOnlyTextProperty) MatchOnlyTextPropertyCaster() *MatchOnlyTextProperty { return s } + +func (s *MatchOnlyTextProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/matchphraseprefixquery.go b/typedapi/types/matchphraseprefixquery.go index 4b8dbaac5f..5f4e4f8ec7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // MatchPhrasePrefixQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L440-L469 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -184,8 +184,6 @@ func NewMatchPhrasePrefixQuery() *MatchPhrasePrefixQuery { return r } -// true - type MatchPhrasePrefixQueryVariant interface { MatchPhrasePrefixQueryCaster() *MatchPhrasePrefixQuery } diff --git a/typedapi/types/matchphrasequery.go b/typedapi/types/matchphrasequery.go index 62f6442a25..ecf7a8ca45 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // MatchPhraseQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L414-L438 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -165,8 +165,6 @@ func NewMatchPhraseQuery() *MatchPhraseQuery { return r } -// true - type MatchPhraseQueryVariant interface { MatchPhraseQueryCaster() *MatchPhraseQuery } diff --git a/typedapi/types/matchquery.go b/typedapi/types/matchquery.go index 85ca42039d..2151d6edc1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // MatchQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L285-L353 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -280,8 +280,6 @@ func NewMatchQuery() *MatchQuery { return r } -// true - type MatchQueryVariant interface { MatchQueryCaster() *MatchQuery } diff --git a/typedapi/types/matrixstatsaggregate.go b/typedapi/types/matrixstatsaggregate.go index 9bca6907ee..eebe9b23c5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MatrixStatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L866-L873 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 033492999b..ceb27cf08a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // MatrixStatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/matrix.ts#L38-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/matrix.ts#L38-L44 type MatrixStatsAggregation struct { // Fields An array of fields for computing the statistics. Fields []string `json:"fields,omitempty"` @@ -101,8 +101,6 @@ func NewMatrixStatsAggregation() *MatrixStatsAggregation { return r } -// true - type MatrixStatsAggregationVariant interface { MatrixStatsAggregationCaster() *MatrixStatsAggregation } diff --git a/typedapi/types/matrixstatsfields.go b/typedapi/types/matrixstatsfields.go index 5be57e6d0e..4ba149fa6b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MatrixStatsFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L875-L884 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9eb02a08bc..a3877d69ef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MaxAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L205-L209 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6400e40e62..7ba0c2cb96 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MaxAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L165-L165 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L171-L171 type MaxAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -96,8 +96,6 @@ func NewMaxAggregation() *MaxAggregation { return r } -// true - type MaxAggregationVariant interface { MaxAggregationCaster() *MaxAggregation } diff --git a/typedapi/types/maxbucketaggregation.go b/typedapi/types/maxbucketaggregation.go index 08a027892d..2b6949c37b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // MaxBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L244-L247 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -94,8 +94,6 @@ func NewMaxBucketAggregation() *MaxBucketAggregation { return r } -// true - type MaxBucketAggregationVariant interface { MaxBucketAggregationCaster() *MaxBucketAggregation } diff --git a/typedapi/types/maxmind.go b/typedapi/types/maxmind.go index b01bb8493c..1a7a90eae2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Maxmind type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Database.ts#L55-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Database.ts#L55-L57 type Maxmind struct { AccountId string `json:"account_id"` } @@ -67,8 +67,6 @@ func NewMaxmind() *Maxmind { return r } -// true - type MaxmindVariant interface { MaxmindCaster() *Maxmind } diff --git a/typedapi/types/medianabsolutedeviationaggregate.go b/typedapi/types/medianabsolutedeviationaggregate.go index 4b7cf6c9b4..1bb12dbb2e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MedianAbsoluteDeviationAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L196-L197 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 70a182b547..0212900395 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,16 +27,25 @@ import ( "fmt" "io" "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tdigestexecutionhint" ) // MedianAbsoluteDeviationAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L167-L176 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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) @@ -116,8 +130,6 @@ func NewMedianAbsoluteDeviationAggregation() *MedianAbsoluteDeviationAggregation return r } -// true - type MedianAbsoluteDeviationAggregationVariant interface { MedianAbsoluteDeviationAggregationCaster() *MedianAbsoluteDeviationAggregation } diff --git a/typedapi/types/memmlstats.go b/typedapi/types/memmlstats.go index 63d9e296d8..1e2dc12043 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MemMlStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_memory_stats/types.ts#L90-L111 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d7d41419e7..e68c91e089 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Memory type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_memory_stats/types.ts#L25-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8e8f51f297..2d92bc6259 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MemoryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L632-L656 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 da43f97329..c7100af6c3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MemStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/get_memory_stats/types.ts#L65-L88 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dff5978df7..8679183890 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Merge type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L346-L348 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L359-L361 type Merge struct { Scheduler *MergeScheduler `json:"scheduler,omitempty"` } @@ -34,8 +34,6 @@ func NewMerge() *Merge { return r } -// true - type MergeVariant interface { MergeCaster() *Merge } diff --git a/typedapi/types/mergescheduler.go b/typedapi/types/mergescheduler.go index 49b7e8cc86..81adc33c7b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // MergeScheduler type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L350-L353 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L363-L366 type MergeScheduler struct { MaxMergeCount Stringifiedinteger `json:"max_merge_count,omitempty"` MaxThreadCount Stringifiedinteger `json:"max_thread_count,omitempty"` @@ -73,8 +73,6 @@ func NewMergeScheduler() *MergeScheduler { return r } -// true - type MergeSchedulerVariant interface { MergeSchedulerCaster() *MergeScheduler } diff --git a/typedapi/types/mergesstats.go b/typedapi/types/mergesstats.go index 91d03307be..015fd1f914 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MergesStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L166-L183 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L188-L205 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 4af9dfcc1a..0caa7ea59b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,15 +31,58 @@ import ( // Message type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L135-L155 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` } @@ -97,8 +140,6 @@ func NewMessage() *Message { return r } -// true - type MessageVariant interface { MessageCaster() *Message } diff --git a/typedapi/types/messagecontent.go b/typedapi/types/messagecontent.go index bcd18bdc69..f6c48f13d2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // []ContentObject // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L130-L133 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L169-L172 type MessageContent any type MessageContentVariant interface { diff --git a/typedapi/types/metadata.go b/typedapi/types/metadata.go index 14a99bb314..22eefcb20d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // Metadata type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L93-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L93-L93 type Metadata map[string]json.RawMessage type MetadataVariant interface { diff --git a/typedapi/types/metrics.go b/typedapi/types/metrics.go index 3d590152e5..769f035192 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Metrics type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L70-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L70-L70 type Metrics []string diff --git a/typedapi/types/mgetoperation.go b/typedapi/types/mgetoperation.go index 880e658e1f..23c6f27bfb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // MgetOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/mget/types.ts#L32-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -153,8 +153,6 @@ func NewMgetOperation() *MgetOperation { return r } -// true - type MgetOperationVariant interface { MgetOperationCaster() *MgetOperation } diff --git a/typedapi/types/mgetresponseitem.go b/typedapi/types/mgetresponseitem.go index b851e33e8e..7d77180a64 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // GetResult // MultiGetError // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/mget/types.ts#L57-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/mget/types.ts#L57-L60 type MgetResponseItem any diff --git a/typedapi/types/migrateaction.go b/typedapi/types/migrateaction.go index 9fcce8ea10..25595573f2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MigrateAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L141-L143 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L141-L143 type MigrateAction struct { Enabled *bool `json:"enabled,omitempty"` } @@ -77,8 +77,6 @@ func NewMigrateAction() *MigrateAction { return r } -// true - type MigrateActionVariant interface { MigrateActionCaster() *MigrateAction } diff --git a/typedapi/types/migratereindex.go b/typedapi/types/migratereindex.go index d1e1d0b0bb..a473ca3f27 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // MigrateReindex type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L39-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L39-L48 type MigrateReindex struct { // Mode Reindex mode. Currently only 'upgrade' is supported. Mode modeenum.ModeEnum `json:"mode"` @@ -41,8 +41,6 @@ func NewMigrateReindex() *MigrateReindex { return r } -// true - type MigrateReindexVariant interface { MigrateReindexCaster() *MigrateReindex } diff --git a/typedapi/types/migrationfeatureindexinfo.go b/typedapi/types/migrationfeatureindexinfo.go index 7f6631c445..a965861fc7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // MigrationFeatureIndexInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/migration/get_feature_upgrade_status/GetFeatureUpgradeStatusResponse.ts#L44-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ec51814e93..314d907392 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MinAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L199-L203 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b77d40d708..5a7cb8abf6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MinAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L178-L178 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L190-L190 type MinAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -96,8 +96,6 @@ func NewMinAggregation() *MinAggregation { return r } -// true - type MinAggregationVariant interface { MinAggregationCaster() *MinAggregation } diff --git a/typedapi/types/minbucketaggregation.go b/typedapi/types/minbucketaggregation.go index 7ec8116cde..a4496a4269 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // MinBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L249-L252 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -94,8 +94,6 @@ func NewMinBucketAggregation() *MinBucketAggregation { return r } -// true - type MinBucketAggregationVariant interface { MinBucketAggregationCaster() *MinBucketAggregation } diff --git a/typedapi/types/minhashtokenfilter.go b/typedapi/types/minhashtokenfilter.go new file mode 100644 index 0000000000..ae403901fd --- /dev/null +++ b/typedapi/types/minhashtokenfilter.go @@ -0,0 +1,180 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// MinHashTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type MinHashTokenFilterVariant interface { + MinHashTokenFilterCaster() *MinHashTokenFilter +} + +func (s *MinHashTokenFilter) MinHashTokenFilterCaster() *MinHashTokenFilter { + return s +} + +func (s *MinHashTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/minimallicenseinformation.go b/typedapi/types/minimallicenseinformation.go index 0399339f29..4f3fbc17ab 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // MinimalLicenseInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/info/types.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ef838151b4..ab0fc5574c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // int // string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L160-L164 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L160-L164 type MinimumShouldMatch any type MinimumShouldMatchVariant interface { diff --git a/typedapi/types/missing.go b/typedapi/types/missing.go index a09dce43ef..b31c0d88ca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ package types // Float64 // bool // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/AggregationContainer.ts#L535-L535 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/AggregationContainer.ts#L535-L535 type Missing any type MissingVariant interface { diff --git a/typedapi/types/missingaggregate.go b/typedapi/types/missingaggregate.go index f36c9ccd90..03cbc7a247 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // MissingAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L528-L532 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 39b96890f5..dec9765504 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // MissingAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L593-L599 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L593-L599 type MissingAggregation struct { // Field The name of the field. Field *string `json:"field,omitempty"` @@ -74,8 +74,6 @@ func NewMissingAggregation() *MissingAggregation { return r } -// true - type MissingAggregationVariant interface { MissingAggregationCaster() *MissingAggregation } diff --git a/typedapi/types/mistralservicesettings.go b/typedapi/types/mistralservicesettings.go index bf17a4d450..344163c518 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MistralServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L976-L1003 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -129,8 +128,6 @@ func NewMistralServiceSettings() *MistralServiceSettings { return r } -// true - type MistralServiceSettingsVariant interface { MistralServiceSettingsCaster() *MistralServiceSettings } diff --git a/typedapi/types/mlcounter.go b/typedapi/types/mlcounter.go index 92870995b7..b22f714bfb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MlCounter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L265-L267 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5b02178e3b..1684578a37 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MLDatafeed type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Datafeed.ts#L37-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3ec9443a98..65a02b3fb5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // MlDataFrameAnalyticsJobs type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L187-L192 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e578886592..7f8d922704 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MlDataFrameAnalyticsJobsAnalysis type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L194-L198 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1baacda66c..19664f9552 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MlDataFrameAnalyticsJobsCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L204-L206 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9771c0d37f..176e33b476 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // MlDataFrameAnalyticsJobsMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L200-L202 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 61de1051ae..1a58dcf023 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MLFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Filter.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 467a2121d0..8280486aef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // MlInference type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L208-L216 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a984ae912d..98c54513ad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MlInferenceDeployments type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L237-L242 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 926be83487..6479b3bc15 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MlInferenceDeploymentsTimeMs type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L244-L246 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c8b8414953..8131780450 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // MlInferenceIngestProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L218-L223 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 281cfe4742..fa081e297d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MlInferenceIngestProcessorCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L248-L252 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fe5b02f3c5..0b34f995a9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // MlInferenceTrainedModels type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L225-L235 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 83fbd53d1c..8d367831f2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MlInferenceTrainedModelsCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L254-L263 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a2cb591b81..d8ed482038 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MlJobForecasts type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L182-L185 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2b21b0ec70..d22412d94c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ModelPackageConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L257-L272 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c47312426b..dc02a84c94 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ModelPlotConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/ModelPlot.ts#L23-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -106,8 +106,6 @@ func NewModelPlotConfig() *ModelPlotConfig { return r } -// true - type ModelPlotConfigVariant interface { ModelPlotConfigCaster() *ModelPlotConfig } diff --git a/typedapi/types/modelsizestats.go b/typedapi/types/modelsizestats.go index 367f721da0..ce6b641b0c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // ModelSizeStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Model.ts#L59-L82 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eaf90e9798..6212e95253 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ModelSnapshot type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Model.ts#L25-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 45a68065b1..a84eedb531 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ModelSnapshotUpgrade type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Model.ts#L48-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fb609a9cf2..1dac33c80e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Monitoring type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L387-L390 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L387-L390 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 e6c63b2638..6e699fc603 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // MoreLikeThisQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L87-L172 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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": @@ -372,8 +361,6 @@ func NewMoreLikeThisQuery() *MoreLikeThisQuery { return r } -// true - type MoreLikeThisQueryVariant interface { MoreLikeThisQueryCaster() *MoreLikeThisQuery } diff --git a/typedapi/types/mountedsnapshot.go b/typedapi/types/mountedsnapshot.go index a98cf6032c..5667814c34 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // MountedSnapshot type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/searchable_snapshots/mount/types.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7df9108002..d09ca309f3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -28,7 +28,7 @@ package types // HoltMovingAverageAggregation // HoltWintersMovingAverageAggregation // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L254-L260 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/pipeline.ts#L254-L260 type MovingAverageAggregation any type MovingAverageAggregationVariant interface { diff --git a/typedapi/types/movingfunctionaggregation.go b/typedapi/types/movingfunctionaggregation.go index 14270fe6ca..e0ce70137f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // MovingFunctionAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L314-L332 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -147,8 +147,6 @@ func NewMovingFunctionAggregation() *MovingFunctionAggregation { return r } -// true - type MovingFunctionAggregationVariant interface { MovingFunctionAggregationCaster() *MovingFunctionAggregation } diff --git a/typedapi/types/movingpercentilesaggregation.go b/typedapi/types/movingpercentilesaggregation.go index d6591ab7ad..4e09098c22 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // MovingPercentilesAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L334-L349 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -148,8 +148,6 @@ func NewMovingPercentilesAggregation() *MovingPercentilesAggregation { return r } -// true - type MovingPercentilesAggregationVariant interface { MovingPercentilesAggregationCaster() *MovingPercentilesAggregation } diff --git a/typedapi/types/msearchrequestitem.go b/typedapi/types/msearchrequestitem.go index d36b5d7d1d..543c1dfa3c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // MultisearchHeader // SearchRequestBody // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/msearch/types.ts#L26-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch/types.ts#L26-L29 type MsearchRequestItem any type MsearchRequestItemVariant interface { diff --git a/typedapi/types/msearchresponseitem.go b/typedapi/types/msearchresponseitem.go index ff78ebc3de..2452ff5c8b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // MultiSearchItem // ErrorResponseBase // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/msearch/types.ts#L53-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch/types.ts#L53-L56 type MsearchResponseItem any diff --git a/typedapi/types/mtermvectorsoperation.go b/typedapi/types/mtermvectorsoperation.go index c32c9a2f32..e97dd2c5ce 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // MTermVectorsOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/mtermvectors/types.ts#L35-L94 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -216,8 +216,6 @@ func NewMTermVectorsOperation() *MTermVectorsOperation { return r } -// true - type MTermVectorsOperationVariant interface { MTermVectorsOperationCaster() *MTermVectorsOperation } diff --git a/typedapi/types/multigeterror.go b/typedapi/types/multigeterror.go index 29e80414fb..3bdab3d83c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // MultiGetError type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/mget/types.ts#L62-L66 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d79c3ac23e..6d05af28dc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // MultiMatchQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L471-L557 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -335,8 +335,6 @@ func NewMultiMatchQuery() *MultiMatchQuery { return r } -// true - type MultiMatchQueryVariant interface { MultiMatchQueryCaster() *MultiMatchQuery } diff --git a/typedapi/types/multiplexertokenfilter.go b/typedapi/types/multiplexertokenfilter.go index 18b93ce873..17b24b46a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,9 +30,12 @@ import ( // MultiplexerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L261-L265 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -100,8 +103,6 @@ func NewMultiplexerTokenFilter() *MultiplexerTokenFilter { return r } -// true - type MultiplexerTokenFilterVariant interface { MultiplexerTokenFilterCaster() *MultiplexerTokenFilter } @@ -109,3 +110,8 @@ type MultiplexerTokenFilterVariant interface { func (s *MultiplexerTokenFilter) MultiplexerTokenFilterCaster() *MultiplexerTokenFilter { return s } + +func (s *MultiplexerTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/multisearchheader.go b/typedapi/types/multisearchheader.go index 98e854ffaf..95cd04aaf8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // MultisearchHeader type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/msearch/types.ts#L31-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch/types.ts#L31-L46 type MultisearchHeader struct { AllowNoIndices *bool `json:"allow_no_indices,omitempty"` AllowPartialSearchResults *bool `json:"allow_partial_search_results,omitempty"` @@ -214,8 +214,6 @@ func NewMultisearchHeader() *MultisearchHeader { return r } -// true - type MultisearchHeaderVariant interface { MultisearchHeaderCaster() *MultisearchHeader } @@ -223,3 +221,13 @@ type MultisearchHeaderVariant interface { func (s *MultisearchHeader) MultisearchHeaderCaster() *MultisearchHeader { return s } + +func (s *MultisearchHeader) MsearchRequestItemCaster() *MsearchRequestItem { + o := MsearchRequestItem(s) + return &o +} + +func (s *MultisearchHeader) RequestItemCaster() *RequestItem { + o := RequestItem(s) + return &o +} diff --git a/typedapi/types/multisearchitem.go b/typedapi/types/multisearchitem.go index 48b659b55b..29300ce243 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // MultiSearchItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/msearch/types.ts#L58-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch/types.ts#L58-L61 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 059714b03c..91c25b119b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // MultiTermLookup type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L643-L653 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L643-L653 type MultiTermLookup struct { // Field A fields from which to retrieve terms. Field string `json:"field"` @@ -76,8 +76,6 @@ func NewMultiTermLookup() *MultiTermLookup { return r } -// true - type MultiTermLookupVariant interface { MultiTermLookupCaster() *MultiTermLookup } diff --git a/typedapi/types/multitermsaggregate.go b/typedapi/types/multitermsaggregate.go index a774405693..0810e7621f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MultiTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L501-L506 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 01cdcfcf12..34335cf656 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // MultiTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L601-L641 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L601-L641 type MultiTermsAggregation struct { // CollectMode Specifies the strategy for data collection. CollectMode *termsaggregationcollectmode.TermsAggregationCollectMode `json:"collect_mode,omitempty"` @@ -192,8 +192,6 @@ func NewMultiTermsAggregation() *MultiTermsAggregation { return r } -// true - type MultiTermsAggregationVariant interface { MultiTermsAggregationCaster() *MultiTermsAggregation } diff --git a/typedapi/types/multitermsbucket.go b/typedapi/types/multitermsbucket.go index 7c75b215a1..abff795339 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // MultiTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L508-L512 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a71c2780aa..3844a16041 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // Murmur3HashProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/specialized.ts#L90-L92 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -846,8 +858,6 @@ func NewMurmur3HashProperty() *Murmur3HashProperty { return r } -// true - type Murmur3HashPropertyVariant interface { Murmur3HashPropertyCaster() *Murmur3HashProperty } @@ -855,3 +865,8 @@ type Murmur3HashPropertyVariant interface { func (s *Murmur3HashProperty) Murmur3HashPropertyCaster() *Murmur3HashProperty { return s } + +func (s *Murmur3HashProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/mutualinformationheuristic.go b/typedapi/types/mutualinformationheuristic.go index 262b391145..e90cfd8135 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // MutualInformationHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L800-L809 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -96,8 +96,6 @@ func NewMutualInformationHeuristic() *MutualInformationHeuristic { return r } -// true - type MutualInformationHeuristicVariant interface { MutualInformationHeuristicCaster() *MutualInformationHeuristic } diff --git a/typedapi/types/names.go b/typedapi/types/names.go index 410820a4c9..9e7d5ffd58 100644 --- a/typedapi/types/names.go +++ b/typedapi/types/names.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Names type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L75-L75 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L75-L75 type Names []string type NamesVariant interface { diff --git a/typedapi/types/nativecode.go b/typedapi/types/nativecode.go index f61e359a33..24bebb3309 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NativeCode type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/info/types.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1fdfb82898..619c7ac92b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NativeCodeInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/info/types.ts#L29-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c4f8945926..4d3027c769 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NerInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L273-L282 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -97,8 +97,6 @@ func NewNerInferenceOptions() *NerInferenceOptions { return r } -// true - type NerInferenceOptionsVariant interface { NerInferenceOptionsCaster() *NerInferenceOptions } diff --git a/typedapi/types/nerinferenceupdateoptions.go b/typedapi/types/nerinferenceupdateoptions.go index c76d118748..9078370b77 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NerInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L423-L428 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -84,8 +84,6 @@ func NewNerInferenceUpdateOptions() *NerInferenceUpdateOptions { return r } -// true - type NerInferenceUpdateOptionsVariant interface { NerInferenceUpdateOptionsCaster() *NerInferenceUpdateOptions } diff --git a/typedapi/types/nestedaggregate.go b/typedapi/types/nestedaggregate.go index 76ff8cca4d..21ff150c65 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // NestedAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L534-L538 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e98ae22bba..40d4ea7a71 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // NestedAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L655-L660 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L655-L660 type NestedAggregation struct { // Path The path to the field of type `nested`. Path *string `json:"path,omitempty"` @@ -68,8 +68,6 @@ func NewNestedAggregation() *NestedAggregation { return r } -// true - type NestedAggregationVariant interface { NestedAggregationCaster() *NestedAggregation } diff --git a/typedapi/types/nestedidentity.go b/typedapi/types/nestedidentity.go index ab8bcda504..18675bc15a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NestedIdentity type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/hits.ts#L89-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L89-L93 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 fc0a75300b..416f84fa13 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // NestedProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/complex.ts#L39-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -878,8 +890,6 @@ func NewNestedProperty() *NestedProperty { return r } -// true - type NestedPropertyVariant interface { NestedPropertyCaster() *NestedProperty } @@ -887,3 +897,8 @@ type NestedPropertyVariant interface { func (s *NestedProperty) NestedPropertyCaster() *NestedProperty { return s } + +func (s *NestedProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/nestedquery.go b/typedapi/types/nestedquery.go index 732adeb7b3..7580359cc2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // NestedQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/joining.ts#L112-L139 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -145,8 +145,6 @@ func NewNestedQuery() *NestedQuery { return r } -// true - type NestedQueryVariant interface { NestedQueryCaster() *NestedQuery } diff --git a/typedapi/types/nestedsortvalue.go b/typedapi/types/nestedsortvalue.go index 5e8e448a47..df5d333d1d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NestedSortValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/sort.ts#L29-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L29-L34 type NestedSortValue struct { Filter *Query `json:"filter,omitempty"` MaxChildren *int `json:"max_children,omitempty"` @@ -97,8 +97,6 @@ func NewNestedSortValue() *NestedSortValue { return r } -// true - type NestedSortValueVariant interface { NestedSortValueCaster() *NestedSortValue } diff --git a/typedapi/types/networkdirectionprocessor.go b/typedapi/types/networkdirectionprocessor.go index e3e37bde17..038b50642e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NetworkDirectionProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1249-L1283 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1249-L1283 type NetworkDirectionProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -178,8 +178,6 @@ func NewNetworkDirectionProcessor() *NetworkDirectionProcessor { return r } -// true - type NetworkDirectionProcessorVariant interface { NetworkDirectionProcessorCaster() *NetworkDirectionProcessor } diff --git a/typedapi/types/nevercondition.go b/typedapi/types/nevercondition.go index 52de5f81e4..f750c896b5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NeverCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Conditions.ts#L73-L73 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L73-L73 type NeverCondition struct { } @@ -33,8 +33,6 @@ func NewNeverCondition() *NeverCondition { return r } -// true - type NeverConditionVariant interface { NeverConditionCaster() *NeverCondition } diff --git a/typedapi/types/ngramtokenfilter.go b/typedapi/types/ngramtokenfilter.go index e342dcacce..a024bae6f8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,10 +31,13 @@ import ( // NGramTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L267-L272 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -130,8 +133,6 @@ func NewNGramTokenFilter() *NGramTokenFilter { return r } -// true - type NGramTokenFilterVariant interface { NGramTokenFilterCaster() *NGramTokenFilter } @@ -139,3 +140,8 @@ type NGramTokenFilterVariant interface { func (s *NGramTokenFilter) NGramTokenFilterCaster() *NGramTokenFilter { return s } + +func (s *NGramTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/ngramtokenizer.go b/typedapi/types/ngramtokenizer.go index 3b8fd3d56d..d1035c6e15 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // NGramTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L84-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L85-L95 type NGramTokenizer struct { CustomTokenChars *string `json:"custom_token_chars,omitempty"` MaxGram *int `json:"max_gram,omitempty"` @@ -146,8 +146,6 @@ func NewNGramTokenizer() *NGramTokenizer { return r } -// true - type NGramTokenizerVariant interface { NGramTokenizerCaster() *NGramTokenizer } @@ -155,3 +153,8 @@ type NGramTokenizerVariant interface { func (s *NGramTokenizer) NGramTokenizerCaster() *NGramTokenizer { return s } + +func (s *NGramTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/nlpberttokenizationconfig.go b/typedapi/types/nlpberttokenizationconfig.go index 464d8e0ce6..241456eaf9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // NlpBertTokenizationConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L188-L189 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -141,8 +141,6 @@ func NewNlpBertTokenizationConfig() *NlpBertTokenizationConfig { return r } -// true - type NlpBertTokenizationConfigVariant interface { NlpBertTokenizationConfigCaster() *NlpBertTokenizationConfig } diff --git a/typedapi/types/nlprobertatokenizationconfig.go b/typedapi/types/nlprobertatokenizationconfig.go index cf9ed74b01..2c137eb5c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // NlpRobertaTokenizationConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L191-L198 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -157,8 +157,6 @@ func NewNlpRobertaTokenizationConfig() *NlpRobertaTokenizationConfig { return r } -// true - type NlpRobertaTokenizationConfigVariant interface { NlpRobertaTokenizationConfigCaster() *NlpRobertaTokenizationConfig } diff --git a/typedapi/types/nlptokenizationupdateoptions.go b/typedapi/types/nlptokenizationupdateoptions.go index b8c90100fd..9d054ef0b3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // NlpTokenizationUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L375-L380 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L375-L380 type NlpTokenizationUpdateOptions struct { // Span Span options to apply Span *int `json:"span,omitempty"` @@ -89,8 +89,6 @@ func NewNlpTokenizationUpdateOptions() *NlpTokenizationUpdateOptions { return r } -// true - type NlpTokenizationUpdateOptionsVariant interface { NlpTokenizationUpdateOptionsCaster() *NlpTokenizationUpdateOptions } diff --git a/typedapi/types/node.go b/typedapi/types/node.go index b73825a300..a85693ef7b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Node type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/searchable_snapshots/cache_stats/Response.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ca596c7a63..eaeb8f6ba3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // NodeAllocationExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/types.ts#L103-L117 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9bc0784d59..ba8046687c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // NodeAttributes type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Node.ts#L41-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 13ebbd13a0..08e4b72e63 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeAttributesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/nodeattrs/types.ts#L20-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dc534391ad..cfda4b5ee5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeBufferPool type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L859-L880 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 73e0bdee2d..2e12ac50db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // NodeDiskUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/types.ts#L57-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ee0b0d2688..d6ba1882bc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodeIds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L58-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L58-L58 type NodeIds []string diff --git a/typedapi/types/nodeinfo.go b/typedapi/types/nodeinfo.go index 9fc1a00cd7..eced2b7808 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,31 +33,33 @@ import ( // NodeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L31-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ecd7a1b953..51eae5ec5f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L184-L186 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9e7c45e98b..09183de52b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodeInfoAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L235-L237 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 102b6b49e3..634d9b1905 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoBootstrap type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L204-L206 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d2b038388b..ec033981e7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoClient type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L188-L190 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7b617ee5fa..8429640c2c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoDiscover type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L173-L182 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 db0ccd3711..935eb8b2da 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoHttp type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L311-L316 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 941a4677db..4d62318270 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodeInfoIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L227-L229 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 28b5196ac4..b78def3e8f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoIngestDownloader type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L128-L130 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9096ec2ba3..df78a90f0b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodeInfoIngestInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L124-L126 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dee86f471a..f721a114b2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoIngestProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L231-L233 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 590969fca7..2631a8c3b9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoJvmMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L318-L329 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d5b5109192..3a9330ef56 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L331-L334 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 502d687b22..4a988dc681 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoOSCPU type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L347-L356 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 46d37251c8..2b2e5d2705 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoPath type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L158-L163 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 afd43cf2cd..bbd41bee0c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodeInfoRepositories type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L165-L167 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 44dab29c7c..bd7c3a6c98 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoRepositoriesUrl type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L169-L171 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c7c16701c6..4c189d6390 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoScript type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L289-L292 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1707a60f3f..154503de61 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodeInfoSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L294-L296 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 edc5a3e57c..9ede1ca089 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoSearchRemote type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L298-L300 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 57155b2126..9628ccd9b5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodeInfoSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L69-L85 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cc84283f63..6e62d20d95 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // NodeInfoSettingsCluster type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L132-L142 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 117037f6a5..9915aeec77 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // NodeInfoSettingsClusterElection type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L148-L150 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 769f654a6a..ed2c986bcd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,10 +31,10 @@ import ( // NodeInfoSettingsHttp type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L192-L197 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 60f11a4516..48d8853ba6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsHttpType type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L199-L202 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d933ce35f4..964527f1a4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodeInfoSettingsIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L87-L122 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9dd607c75f..517ae2ded4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // NodeInfoSettingsNetwork type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L223-L225 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a6c385cbb0..4ccb215b96 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L152-L156 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 06c1bf74b8..6e902b388e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,13 @@ import ( // NodeInfoSettingsTransport type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L208-L212 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a8e77e31f8..afc23d4e1f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsTransportFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L219-L221 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9280bba3cf..d9cfebb483 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoSettingsTransportType type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L214-L217 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 976fea5b13..61c746ba4b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoTransport type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L358-L362 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7f5083a353..731996da4b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // NodeInfoXpack type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L239-L244 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d260bf66d4..93b89accc1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodeInfoXpackLicense type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L281-L283 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 60df9d8838..8b3bb723ba 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackLicenseType type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L285-L287 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 55e0f29618..22d883d81b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackMl type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L253-L255 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fcab9c3c1d..f2ccb4b68e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackSecurity type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L246-L251 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ee75c86fff..8894d2ee2d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodeInfoXpackSecurityAuthc type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L261-L264 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ace12b20df..98cfb36297 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodeInfoXpackSecurityAuthcRealms type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L266-L270 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e74044c8ce..1d2aa1645a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackSecurityAuthcRealmsStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L276-L279 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 65166a2146..36820e844d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeInfoXpackSecurityAuthcToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L272-L274 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7d7b0cf701..778860be5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodeInfoXpackSecuritySsl type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L257-L259 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1ebae4ee72..42dc7b1127 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeJvmInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L364-L378 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 81bd773898..c525453345 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeOperatingSystemInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L380-L397 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3c2ab38c89..c29e5260d0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodePackagingType type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L526-L539 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 37bea6a75f..a8be4872aa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeProcessInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L399-L406 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 70917a2f51..e0e3ad2461 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // NodeReloadResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/NodeReloadResult.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3342431089..0f396c7a34 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodesContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L1068-L1073 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ab0bd80bcb..7f4c7b2396 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodesCredentials type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_service_credentials/types.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 365f95dd86..2cebf36fca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodesCredentialsFileToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_service_credentials/types.ts#L30-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 53cebb856b..97e67530ee 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // NodeShard type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Node.ts#L54-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5e2105db6d..6a7ba8ab10 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // NodeShutdownStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L29-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5c2e36042a..645974176a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodesIndexingPressure type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L116-L121 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c992e217a3..80ff70550c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodesIndexingPressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L123-L142 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4792f729d3..8a667fc921 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // NodesIngest type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L345-L354 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7604155ada..10a39fed1a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/nodes/types.ts#L23-L542 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d4cd23824f..768dd08b71 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Node.ts#L28-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0c5cb661c6..2a2a07b768 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // NodeTasks type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/tasks/_types/TaskListResponseBase.ts#L49-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c19d7e2cfa..ccc5f91f05 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // NodeThreadPoolInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/info/types.ts#L302-L309 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9632e40a7e..21ed3a2bda 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // NodeUsage type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/usage/types.ts#L25-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f2810b6c8c..a31b093442 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // NoriAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L323-L330 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L323-L330 type NoriAnalyzer struct { DecompoundMode *noridecompoundmode.NoriDecompoundMode `json:"decompound_mode,omitempty"` Stoptags []string `json:"stoptags,omitempty"` @@ -117,8 +117,6 @@ func NewNoriAnalyzer() *NoriAnalyzer { return r } -// true - type NoriAnalyzerVariant interface { NoriAnalyzerCaster() *NoriAnalyzer } @@ -126,3 +124,8 @@ type NoriAnalyzerVariant interface { func (s *NoriAnalyzer) NoriAnalyzerCaster() *NoriAnalyzer { return s } + +func (s *NoriAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/noripartofspeechtokenfilter.go b/typedapi/types/noripartofspeechtokenfilter.go index b6da639b81..0f1b532b19 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,8 +30,9 @@ import ( // NoriPartOfSpeechTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L274-L277 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -93,8 +94,6 @@ func NewNoriPartOfSpeechTokenFilter() *NoriPartOfSpeechTokenFilter { return r } -// true - type NoriPartOfSpeechTokenFilterVariant interface { NoriPartOfSpeechTokenFilterCaster() *NoriPartOfSpeechTokenFilter } @@ -102,3 +101,8 @@ type NoriPartOfSpeechTokenFilterVariant interface { func (s *NoriPartOfSpeechTokenFilter) NoriPartOfSpeechTokenFilterCaster() *NoriPartOfSpeechTokenFilter { return s } + +func (s *NoriPartOfSpeechTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/noritokenizer.go b/typedapi/types/noritokenizer.go index 0b198a394e..d7f118c4fc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // NoriTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/nori-plugin.ts#L28-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/nori-plugin.ts#L29-L35 type NoriTokenizer struct { DecompoundMode *noridecompoundmode.NoriDecompoundMode `json:"decompound_mode,omitempty"` DiscardPunctuation *bool `json:"discard_punctuation,omitempty"` @@ -133,8 +133,6 @@ func NewNoriTokenizer() *NoriTokenizer { return r } -// true - type NoriTokenizerVariant interface { NoriTokenizerCaster() *NoriTokenizer } @@ -142,3 +140,8 @@ type NoriTokenizerVariant interface { func (s *NoriTokenizer) NoriTokenizerCaster() *NoriTokenizer { return s } + +func (s *NoriTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/normalizeaggregation.go b/typedapi/types/normalizeaggregation.go index 7dde012859..f278a091fb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // NormalizeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L351-L359 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -102,8 +102,6 @@ func NewNormalizeAggregation() *NormalizeAggregation { return r } -// true - type NormalizeAggregationVariant interface { NormalizeAggregationCaster() *NormalizeAggregation } diff --git a/typedapi/types/normalizer.go b/typedapi/types/normalizer.go index 8ac5dc0d6c..6c28abd5cc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // LowercaseNormalizer // CustomNormalizer // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/normalizers.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/normalizers.ts#L20-L24 type Normalizer any type NormalizerVariant interface { diff --git a/typedapi/types/norwegiananalyzer.go b/typedapi/types/norwegiananalyzer.go index d1375b40ca..996da49676 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // NorwegianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L248-L253 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L248-L253 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": @@ -119,8 +108,6 @@ func NewNorwegianAnalyzer() *NorwegianAnalyzer { return r } -// true - type NorwegianAnalyzerVariant interface { NorwegianAnalyzerCaster() *NorwegianAnalyzer } @@ -128,3 +115,8 @@ type NorwegianAnalyzerVariant interface { func (s *NorwegianAnalyzer) NorwegianAnalyzerCaster() *NorwegianAnalyzer { return s } + +func (s *NorwegianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/notfoundaliases.go b/typedapi/types/notfoundaliases.go new file mode 100644 index 0000000000..f307e6a5ce --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// NotFoundAliases type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c2ee6f87d8..e4842b4c34 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // NumberRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L172-L172 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L168-L168 type NumberRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -41,7 +41,6 @@ type NumberRangeQuery 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"` - From *Float64 `json:"from,omitempty"` // Gt Greater than. Gt *Float64 `json:"gt,omitempty"` // Gte Greater than or equal to. @@ -53,7 +52,6 @@ type NumberRangeQuery struct { QueryName_ *string `json:"_name,omitempty"` // Relation Indicates how the range query matches values for `range` fields. Relation *rangerelation.RangeRelation `json:"relation,omitempty"` - To *Float64 `json:"to,omitempty"` } func (s *NumberRangeQuery) UnmarshalJSON(data []byte) error { @@ -87,11 +85,6 @@ func (s *NumberRangeQuery) UnmarshalJSON(data []byte) error { s.Boost = &f } - case "from": - if err := dec.Decode(&s.From); err != nil { - return fmt.Errorf("%s | %w", "From", err) - } - case "gt": var tmp any dec.Decode(&tmp) @@ -173,11 +166,6 @@ func (s *NumberRangeQuery) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Relation", err) } - case "to": - if err := dec.Decode(&s.To); err != nil { - return fmt.Errorf("%s | %w", "To", err) - } - } } return nil @@ -190,8 +178,6 @@ func NewNumberRangeQuery() *NumberRangeQuery { return r } -// true - type NumberRangeQueryVariant interface { NumberRangeQueryCaster() *NumberRangeQuery } @@ -199,3 +185,8 @@ type NumberRangeQueryVariant interface { func (s *NumberRangeQuery) NumberRangeQueryCaster() *NumberRangeQuery { return s } + +func (s *NumberRangeQuery) RangeQueryCaster() *RangeQuery { + o := RangeQuery(s) + return &o +} diff --git a/typedapi/types/numericdecayfunction.go b/typedapi/types/numericdecayfunction.go index 3a4d880a72..ad76aa1bbd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,7 +29,7 @@ import ( // NumericDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L208-L208 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -75,8 +75,6 @@ func NewNumericDecayFunction() *NumericDecayFunction { return r } -// true - type NumericDecayFunctionVariant interface { NumericDecayFunctionCaster() *NumericDecayFunction } @@ -84,3 +82,8 @@ type NumericDecayFunctionVariant interface { func (s *NumericDecayFunction) NumericDecayFunctionCaster() *NumericDecayFunction { return s } + +func (s *NumericDecayFunction) DecayFunctionCaster() *DecayFunction { + o := DecayFunction(s) + return &o +} diff --git a/typedapi/types/numericfielddata.go b/typedapi/types/numericfielddata.go index e4307f44f7..9b30a50bb6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // NumericFielddata type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/NumericFielddata.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/NumericFielddata.ts#L22-L24 type NumericFielddata struct { Format numericfielddataformat.NumericFielddataFormat `json:"format"` } @@ -38,8 +38,6 @@ func NewNumericFielddata() *NumericFielddata { return r } -// true - type NumericFielddataVariant interface { NumericFielddataCaster() *NumericFielddata } diff --git a/typedapi/types/objectproperty.go b/typedapi/types/objectproperty.go index 37890ae88f..3c5036ded7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // ObjectProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/complex.ts#L46-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -854,8 +866,6 @@ func NewObjectProperty() *ObjectProperty { return r } -// true - type ObjectPropertyVariant interface { ObjectPropertyCaster() *ObjectProperty } @@ -863,3 +873,8 @@ type ObjectPropertyVariant interface { func (s *ObjectProperty) ObjectPropertyCaster() *ObjectProperty { return s } + +func (s *ObjectProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/onehotencodingpreprocessor.go b/typedapi/types/onehotencodingpreprocessor.go index 5030386e45..2ca573c9fb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // OneHotEncodingPreprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/types.ts#L44-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L44-L47 type OneHotEncodingPreprocessor struct { Field string `json:"field"` HotMap map[string]string `json:"hot_map"` @@ -86,8 +86,6 @@ func NewOneHotEncodingPreprocessor() *OneHotEncodingPreprocessor { return r } -// true - type OneHotEncodingPreprocessorVariant interface { OneHotEncodingPreprocessorCaster() *OneHotEncodingPreprocessor } diff --git a/typedapi/types/openaiservicesettings.go b/typedapi/types/openaiservicesettings.go index b4273e9c8a..47b885a26d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // OpenAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1013-L1055 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -164,8 +164,6 @@ func NewOpenAIServiceSettings() *OpenAIServiceSettings { return r } -// true - type OpenAIServiceSettingsVariant interface { OpenAIServiceSettingsCaster() *OpenAIServiceSettings } diff --git a/typedapi/types/openaitasksettings.go b/typedapi/types/openaitasksettings.go index c09d6e6157..958d9d0449 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // OpenAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1057-L1063 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1598-L1604 type OpenAITaskSettings struct { // User For a `completion` or `text_embedding` task, specify the user issuing the // request. @@ -78,8 +78,6 @@ func NewOpenAITaskSettings() *OpenAITaskSettings { return r } -// true - type OpenAITaskSettingsVariant interface { OpenAITaskSettingsCaster() *OpenAITaskSettings } diff --git a/typedapi/types/operatingsystem.go b/typedapi/types/operatingsystem.go index d0d13edabf..8b2e28d142 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // OperatingSystem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L1016-L1022 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2aef0536d5..49ca88283a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,18 +31,28 @@ import ( // OperatingSystemMemoryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/stats/types.ts#L541-L568 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 405d21b940..d4cdb8dd62 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // OperationContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/bulk/types.ts#L158-L180 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -82,8 +82,6 @@ func NewOperationContainer() *OperationContainer { return r } -// true - type OperationContainerVariant interface { OperationContainerCaster() *OperationContainer } diff --git a/typedapi/types/outlierdetectionparameters.go b/typedapi/types/outlierdetectionparameters.go index eab6228df1..785569d1f4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // OutlierDetectionParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L528-L562 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f5df5ff231..3fe3157dc2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // OverallBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Bucket.ts#L129-L144 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 efd354793f..ef58fa0d7f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // OverallBucketJob type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Bucket.ts#L145-L148 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cae43d877d..50f05916e5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Overlapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L39-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 30161f29b5..218f1f64b5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Page type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Page.ts#L22-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/Page.ts#L22-L33 type Page struct { // From Skips the specified number of items. From *int `json:"from,omitempty"` @@ -98,8 +98,6 @@ func NewPage() *Page { return r } -// true - type PageVariant interface { PageCaster() *Page } diff --git a/typedapi/types/pagerdutyaction.go b/typedapi/types/pagerdutyaction.go index 4aed003b06..12a1c31586 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // PagerDutyAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L54-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L54-L54 type PagerDutyAction struct { Account *string `json:"account,omitempty"` AttachPayload bool `json:"attach_payload"` @@ -162,8 +162,6 @@ func NewPagerDutyAction() *PagerDutyAction { return r } -// true - type PagerDutyActionVariant interface { PagerDutyActionCaster() *PagerDutyAction } diff --git a/typedapi/types/pagerdutycontext.go b/typedapi/types/pagerdutycontext.go index 8250d9653e..d4033e8237 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // PagerDutyContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L61-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L61-L65 type PagerDutyContext struct { Href *string `json:"href,omitempty"` Src *string `json:"src,omitempty"` @@ -96,8 +96,6 @@ func NewPagerDutyContext() *PagerDutyContext { return r } -// true - type PagerDutyContextVariant interface { PagerDutyContextCaster() *PagerDutyContext } diff --git a/typedapi/types/pagerdutyevent.go b/typedapi/types/pagerdutyevent.go index 21f91a7a4e..019a0908fc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // PagerDutyEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L40-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2ca18f1740..f75d05cda4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PagerDutyEventProxy type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L56-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L56-L59 type PagerDutyEventProxy struct { Host *string `json:"host,omitempty"` Port *int `json:"port,omitempty"` @@ -85,8 +85,6 @@ func NewPagerDutyEventProxy() *PagerDutyEventProxy { return r } -// true - type PagerDutyEventProxyVariant interface { PagerDutyEventProxyCaster() *PagerDutyEventProxy } diff --git a/typedapi/types/pagerdutyresult.go b/typedapi/types/pagerdutyresult.go index 844a29d0a7..74c4cb91f8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PagerDutyResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L78-L83 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 168b0b4efe..1f7328d93d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // PainlessContextSetup type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/scripts_painless_execute/types.ts#L27-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -93,8 +93,6 @@ func NewPainlessContextSetup() *PainlessContextSetup { return r } -// true - type PainlessContextSetupVariant interface { PainlessContextSetupCaster() *PainlessContextSetup } diff --git a/typedapi/types/parentaggregate.go b/typedapi/types/parentaggregate.go index 0824d93f38..cd1b0e707b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // ParentAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L894-L898 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fcb948d7cb..1af8bcf2cc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ParentAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L662-L667 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L662-L667 type ParentAggregation struct { // Type The child type that should be selected. Type *string `json:"type,omitempty"` @@ -68,8 +68,6 @@ func NewParentAggregation() *ParentAggregation { return r } -// true - type ParentAggregationVariant interface { ParentAggregationCaster() *ParentAggregation } diff --git a/typedapi/types/parentidquery.go b/typedapi/types/parentidquery.go index 4db11963f7..8917268b84 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ParentIdQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/joining.ts#L141-L158 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -128,8 +128,6 @@ func NewParentIdQuery() *ParentIdQuery { return r } -// true - type ParentIdQueryVariant interface { ParentIdQueryCaster() *ParentIdQuery } diff --git a/typedapi/types/parenttaskinfo.go b/typedapi/types/parenttaskinfo.go index 415cad27f9..b299a04a61 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ParentTaskInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/tasks/_types/TaskListResponseBase.ts#L45-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/_types/TaskListResponseBase.ts#L45-L47 type ParentTaskInfo struct { Action string `json:"action"` Cancellable bool `json:"cancellable"` @@ -51,7 +51,7 @@ type ParentTaskInfo struct { Headers map[string]string `json:"headers"` Id int64 `json:"id"` Node string `json:"node"` - ParentTaskId TaskId `json:"parent_task_id,omitempty"` + ParentTaskId *string `json:"parent_task_id,omitempty"` RunningTime Duration `json:"running_time,omitempty"` RunningTimeInNanos int64 `json:"running_time_in_nanos"` StartTimeInMillis int64 `json:"start_time_in_millis"` @@ -216,5 +216,3 @@ func NewParentTaskInfo() *ParentTaskInfo { return r } - -// false diff --git a/typedapi/types/passthroughinferenceoptions.go b/typedapi/types/passthroughinferenceoptions.go index 0ad5b44ad3..3537890f2b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PassThroughInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L239-L246 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -90,8 +90,6 @@ func NewPassThroughInferenceOptions() *PassThroughInferenceOptions { return r } -// true - type PassThroughInferenceOptionsVariant interface { PassThroughInferenceOptionsCaster() *PassThroughInferenceOptions } diff --git a/typedapi/types/passthroughinferenceupdateoptions.go b/typedapi/types/passthroughinferenceupdateoptions.go index 9b5722620d..886f4c3579 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PassThroughInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L404-L409 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -84,8 +84,6 @@ func NewPassThroughInferenceUpdateOptions() *PassThroughInferenceUpdateOptions { return r } -// true - type PassThroughInferenceUpdateOptionsVariant interface { PassThroughInferenceUpdateOptionsCaster() *PassThroughInferenceUpdateOptions } diff --git a/typedapi/types/passthroughobjectproperty.go b/typedapi/types/passthroughobjectproperty.go index 14dcf42a75..171f83a61d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // PassthroughObjectProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/complex.ts#L52-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -880,8 +892,6 @@ func NewPassthroughObjectProperty() *PassthroughObjectProperty { return r } -// true - type PassthroughObjectPropertyVariant interface { PassthroughObjectPropertyCaster() *PassthroughObjectProperty } @@ -889,3 +899,8 @@ type PassthroughObjectPropertyVariant interface { func (s *PassthroughObjectProperty) PassthroughObjectPropertyCaster() *PassthroughObjectProperty { return s } + +func (s *PassthroughObjectProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/pathhierarchytokenizer.go b/typedapi/types/pathhierarchytokenizer.go index f14bfc6fbc..00dc6a7b63 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PathHierarchyTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L95-L102 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L97-L104 type PathHierarchyTokenizer struct { BufferSize Stringifiedinteger `json:"buffer_size,omitempty"` Delimiter *string `json:"delimiter,omitempty"` @@ -136,8 +136,6 @@ func NewPathHierarchyTokenizer() *PathHierarchyTokenizer { return r } -// true - type PathHierarchyTokenizerVariant interface { PathHierarchyTokenizerCaster() *PathHierarchyTokenizer } @@ -145,3 +143,8 @@ type PathHierarchyTokenizerVariant interface { func (s *PathHierarchyTokenizer) PathHierarchyTokenizerCaster() *PathHierarchyTokenizer { return s } + +func (s *PathHierarchyTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/patternanalyzer.go b/typedapi/types/patternanalyzer.go index 26df8208f9..ab74bf6379 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PatternAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L332-L365 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L332-L365 type PatternAnalyzer struct { // Flags Java regular expression flags. Flags should be pipe-separated, eg // "CASE_INSENSITIVE|COMMENTS". @@ -45,7 +45,7 @@ type PatternAnalyzer struct { // Stopwords A pre-defined stop words list like `_english_` or an array containing a list // of stop words. // Defaults to `_none_`. - Stopwords []string `json:"stopwords,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` // StopwordsPath The path to a file containing stop words. StopwordsPath *string `json:"stopwords_path,omitempty"` Type string `json:"type,omitempty"` @@ -106,19 +106,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 "stopwords_path": @@ -173,8 +162,6 @@ func NewPatternAnalyzer() *PatternAnalyzer { return r } -// true - type PatternAnalyzerVariant interface { PatternAnalyzerCaster() *PatternAnalyzer } @@ -182,3 +169,8 @@ type PatternAnalyzerVariant interface { func (s *PatternAnalyzer) PatternAnalyzerCaster() *PatternAnalyzer { return s } + +func (s *PatternAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/patterncapturetokenfilter.go b/typedapi/types/patterncapturetokenfilter.go index cf716aa928..77d893cc4d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,9 +30,11 @@ import ( // PatternCaptureTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L279-L283 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -100,8 +102,6 @@ func NewPatternCaptureTokenFilter() *PatternCaptureTokenFilter { return r } -// true - type PatternCaptureTokenFilterVariant interface { PatternCaptureTokenFilterCaster() *PatternCaptureTokenFilter } @@ -109,3 +109,8 @@ type PatternCaptureTokenFilterVariant interface { func (s *PatternCaptureTokenFilter) PatternCaptureTokenFilterCaster() *PatternCaptureTokenFilter { return s } + +func (s *PatternCaptureTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/patternreplacecharfilter.go b/typedapi/types/patternreplacecharfilter.go index 926ab5eefd..58251e484b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PatternReplaceCharFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/char_filters.ts#L57-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/char_filters.ts#L57-L62 type PatternReplaceCharFilter struct { Flags *string `json:"flags,omitempty"` Pattern string `json:"pattern"` @@ -129,8 +129,6 @@ func NewPatternReplaceCharFilter() *PatternReplaceCharFilter { return r } -// true - type PatternReplaceCharFilterVariant interface { PatternReplaceCharFilterCaster() *PatternReplaceCharFilter } @@ -138,3 +136,8 @@ type PatternReplaceCharFilterVariant interface { func (s *PatternReplaceCharFilter) PatternReplaceCharFilterCaster() *PatternReplaceCharFilter { return s } + +func (s *PatternReplaceCharFilter) CharFilterDefinitionCaster() *CharFilterDefinition { + o := CharFilterDefinition(s) + return &o +} diff --git a/typedapi/types/patternreplacetokenfilter.go b/typedapi/types/patternreplacetokenfilter.go index 8ca49e2264..641aa11b75 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,18 @@ import ( // PatternReplaceTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L285-L291 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -145,8 +152,6 @@ func NewPatternReplaceTokenFilter() *PatternReplaceTokenFilter { return r } -// true - type PatternReplaceTokenFilterVariant interface { PatternReplaceTokenFilterCaster() *PatternReplaceTokenFilter } @@ -154,3 +159,8 @@ type PatternReplaceTokenFilterVariant interface { func (s *PatternReplaceTokenFilter) PatternReplaceTokenFilterCaster() *PatternReplaceTokenFilter { return s } + +func (s *PatternReplaceTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/patterntokenizer.go b/typedapi/types/patterntokenizer.go index 6c6ed81d8d..782f860795 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PatternTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L104-L109 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L106-L111 type PatternTokenizer struct { Flags *string `json:"flags,omitempty"` Group *int `json:"group,omitempty"` @@ -133,8 +133,6 @@ func NewPatternTokenizer() *PatternTokenizer { return r } -// true - type PatternTokenizerVariant interface { PatternTokenizerCaster() *PatternTokenizer } @@ -142,3 +140,8 @@ type PatternTokenizerVariant interface { func (s *PatternTokenizer) PatternTokenizerCaster() *PatternTokenizer { return s } + +func (s *PatternTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/pendingtask.go b/typedapi/types/pendingtask.go index fbb8f9d0d1..a96d0b6330 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PendingTask type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/pending_tasks/types.ts#L23-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c358421822..c4d8df2c36 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PendingTasksRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/pending_tasks/types.ts#L20-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e7a4bd6bd8..6bf6f25d05 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // float32 // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Numeric.ts#L28-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Numeric.ts#L28-L28 type Percentage any type PercentageVariant interface { diff --git a/typedapi/types/percentagescoreheuristic.go b/typedapi/types/percentagescoreheuristic.go index 663c9145e8..892e05497a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // PercentageScoreHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L811-L811 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L811-L811 type PercentageScoreHeuristic struct { } @@ -33,8 +33,6 @@ func NewPercentageScoreHeuristic() *PercentageScoreHeuristic { return r } -// true - type PercentageScoreHeuristicVariant interface { PercentageScoreHeuristicCaster() *PercentageScoreHeuristic } diff --git a/typedapi/types/percentileranksaggregation.go b/typedapi/types/percentileranksaggregation.go index c76a999e19..27bf2f5e2c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PercentileRanksAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L180-L202 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L192-L214 type PercentileRanksAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -137,8 +137,6 @@ func NewPercentileRanksAggregation() *PercentileRanksAggregation { return r } -// true - type PercentileRanksAggregationVariant interface { PercentileRanksAggregationCaster() *PercentileRanksAggregation } diff --git a/typedapi/types/percentiles.go b/typedapi/types/percentiles.go index 466cab24b6..e4ccfe5bf0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // KeyedPercentiles // []ArrayPercentilesItem // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L152-L153 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/Aggregate.ts#L152-L153 type Percentiles any diff --git a/typedapi/types/percentilesaggregation.go b/typedapi/types/percentilesaggregation.go index 93e451eb7d..241ad6ee21 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PercentilesAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L204-L223 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L216-L235 type PercentilesAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -137,8 +137,6 @@ func NewPercentilesAggregation() *PercentilesAggregation { return r } -// true - type PercentilesAggregationVariant interface { PercentilesAggregationCaster() *PercentilesAggregation } diff --git a/typedapi/types/percentilesbucketaggregate.go b/typedapi/types/percentilesbucketaggregate.go index 5cb5057b1c..62a2b0840d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // PercentilesBucketAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L180-L181 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a9d26eafb2..77038f1863 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // PercentilesBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L389-L397 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -101,8 +101,6 @@ func NewPercentilesBucketAggregation() *PercentilesBucketAggregation { return r } -// true - type PercentilesBucketAggregationVariant interface { PercentilesBucketAggregationCaster() *PercentilesBucketAggregation } diff --git a/typedapi/types/percolatequery.go b/typedapi/types/percolatequery.go index 4e2169b7b9..c069bc25ec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PercolateQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L205-L245 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -176,8 +176,6 @@ func NewPercolateQuery() *PercolateQuery { return r } -// true - type PercolateQueryVariant interface { PercolateQueryCaster() *PercolateQuery } diff --git a/typedapi/types/percolatorproperty.go b/typedapi/types/percolatorproperty.go index 775ba19986..4b57ee9eef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // PercolatorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L202-L204 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L203-L205 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 { @@ -796,8 +808,6 @@ func NewPercolatorProperty() *PercolatorProperty { return r } -// true - type PercolatorPropertyVariant interface { PercolatorPropertyCaster() *PercolatorProperty } @@ -805,3 +815,8 @@ type PercolatorPropertyVariant interface { func (s *PercolatorProperty) PercolatorPropertyCaster() *PercolatorProperty { return s } + +func (s *PercolatorProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/perpartitioncategorization.go b/typedapi/types/perpartitioncategorization.go index d1aa146d01..249939f15e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PerPartitionCategorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Analysis.ts#L150-L159 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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`. @@ -101,8 +101,6 @@ func NewPerPartitionCategorization() *PerPartitionCategorization { return r } -// true - type PerPartitionCategorizationVariant interface { PerPartitionCategorizationCaster() *PerPartitionCategorization } diff --git a/typedapi/types/perrepositorystats.go b/typedapi/types/perrepositorystats.go new file mode 100644 index 0000000000..e33801c031 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// PerRepositoryStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 add03b29d8..f5a354dd29 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,11 @@ import ( // PersianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L255-L259 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L255-L259 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": @@ -112,8 +101,6 @@ func NewPersianAnalyzer() *PersianAnalyzer { return r } -// true - type PersianAnalyzerVariant interface { PersianAnalyzerCaster() *PersianAnalyzer } @@ -121,3 +108,8 @@ type PersianAnalyzerVariant interface { func (s *PersianAnalyzer) PersianAnalyzerCaster() *PersianAnalyzer { return s } + +func (s *PersianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/persiannormalizationtokenfilter.go b/typedapi/types/persiannormalizationtokenfilter.go new file mode 100644 index 0000000000..3eec821439 --- /dev/null +++ b/typedapi/types/persiannormalizationtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// PersianNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type PersianNormalizationTokenFilterVariant interface { + PersianNormalizationTokenFilterCaster() *PersianNormalizationTokenFilter +} + +func (s *PersianNormalizationTokenFilter) PersianNormalizationTokenFilterCaster() *PersianNormalizationTokenFilter { + return s +} + +func (s *PersianNormalizationTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/persianstemtokenfilter.go b/typedapi/types/persianstemtokenfilter.go new file mode 100644 index 0000000000..06b0e29555 --- /dev/null +++ b/typedapi/types/persianstemtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// PersianStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type PersianStemTokenFilterVariant interface { + PersianStemTokenFilterCaster() *PersianStemTokenFilter +} + +func (s *PersianStemTokenFilter) PersianStemTokenFilterCaster() *PersianStemTokenFilter { + return s +} + +func (s *PersianStemTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/persistenttaskstatus.go b/typedapi/types/persistenttaskstatus.go index a3d942fefc..7471214bb4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // PersistentTaskStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L56-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b4a4487176..da218e2a72 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Phase type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L26-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L26-L29 type Phase struct { Actions *IlmActions `json:"actions,omitempty"` MinAge Duration `json:"min_age,omitempty"` @@ -73,8 +73,6 @@ func NewPhase() *Phase { return r } -// true - type PhaseVariant interface { PhaseCaster() *Phase } diff --git a/typedapi/types/phases.go b/typedapi/types/phases.go index b10038de13..9528e6c187 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Phases type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L31-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L31-L37 type Phases struct { Cold *Phase `json:"cold,omitempty"` Delete *Phase `json:"delete,omitempty"` @@ -38,8 +38,6 @@ func NewPhases() *Phases { return r } -// true - type PhasesVariant interface { PhasesCaster() *Phases } diff --git a/typedapi/types/phonetictokenfilter.go b/typedapi/types/phonetictokenfilter.go index 8886a650fd..89c52039e2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // PhoneticTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/phonetic-plugin.ts#L64-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/phonetic-plugin.ts#L64-L72 type PhoneticTokenFilter struct { Encoder phoneticencoder.PhoneticEncoder `json:"encoder"` Languageset []phoneticlanguage.PhoneticLanguage `json:"languageset,omitempty"` @@ -165,8 +165,6 @@ func NewPhoneticTokenFilter() *PhoneticTokenFilter { return r } -// true - type PhoneticTokenFilterVariant interface { PhoneticTokenFilterCaster() *PhoneticTokenFilter } @@ -174,3 +172,8 @@ type PhoneticTokenFilterVariant interface { func (s *PhoneticTokenFilter) PhoneticTokenFilterCaster() *PhoneticTokenFilter { return s } + +func (s *PhoneticTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/phrasesuggest.go b/typedapi/types/phrasesuggest.go index 62d2ad4f92..7e36a892af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PhraseSuggest type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L58-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L58-L63 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 1bf0bebd53..ad683f26c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestCollate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L334-L347 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L334-L347 type PhraseSuggestCollate struct { // Params Parameters to use if the query is templated. Params map[string]json.RawMessage `json:"params,omitempty"` @@ -98,8 +98,6 @@ func NewPhraseSuggestCollate() *PhraseSuggestCollate { return r } -// true - type PhraseSuggestCollateVariant interface { PhraseSuggestCollateCaster() *PhraseSuggestCollate } diff --git a/typedapi/types/phrasesuggestcollatequery.go b/typedapi/types/phrasesuggestcollatequery.go index 7e9c79bcd1..ec782e050f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // PhraseSuggestCollateQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L349-L358 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L349-L358 type PhraseSuggestCollateQuery struct { // Id The search template ID. Id *string `json:"id,omitempty"` @@ -106,8 +106,6 @@ func NewPhraseSuggestCollateQuery() *PhraseSuggestCollateQuery { return r } -// true - type PhraseSuggestCollateQueryVariant interface { PhraseSuggestCollateQueryCaster() *PhraseSuggestCollateQuery } diff --git a/typedapi/types/phrasesuggester.go b/typedapi/types/phrasesuggester.go index 1c6e1bd40b..16e6470544 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PhraseSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L360-L418 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L360-L418 type PhraseSuggester struct { // Analyzer The analyzer to analyze the suggest text with. // Defaults to the search analyzer of the suggest field. @@ -300,8 +300,6 @@ func NewPhraseSuggester() *PhraseSuggester { return r } -// true - type PhraseSuggesterVariant interface { PhraseSuggesterCaster() *PhraseSuggester } diff --git a/typedapi/types/phrasesuggesthighlight.go b/typedapi/types/phrasesuggesthighlight.go index e4f497588f..9cdd143fc4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestHighlight type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L420-L429 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L420-L429 type PhraseSuggestHighlight struct { // PostTag Use in conjunction with `pre_tag` to define the HTML tags to use for the // highlighted text. @@ -92,8 +92,6 @@ func NewPhraseSuggestHighlight() *PhraseSuggestHighlight { return r } -// true - type PhraseSuggestHighlightVariant interface { PhraseSuggestHighlightCaster() *PhraseSuggestHighlight } diff --git a/typedapi/types/phrasesuggestoption.go b/typedapi/types/phrasesuggestoption.go index 9dd738b47d..1b9a16270c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PhraseSuggestOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L87-L92 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L87-L92 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 e9368a8eb0..74237c124c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // PinnedDoc type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L269-L278 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L269-L278 type PinnedDoc struct { // Id_ The unique document ID. Id_ string `json:"_id"` @@ -75,8 +75,6 @@ func NewPinnedDoc() *PinnedDoc { return r } -// true - type PinnedDocVariant interface { PinnedDocCaster() *PinnedDoc } diff --git a/typedapi/types/pinnedquery.go b/typedapi/types/pinnedquery.go index b6627f0d81..b75da71d44 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PinnedQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L247-L267 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -166,8 +166,6 @@ func NewPinnedQuery() *PinnedQuery { return r } -// true - type PinnedQueryVariant interface { PinnedQueryCaster() *PinnedQuery } diff --git a/typedapi/types/pinnedretriever.go b/typedapi/types/pinnedretriever.go new file mode 100644 index 0000000000..bc08230314 --- /dev/null +++ b/typedapi/types/pinnedretriever.go @@ -0,0 +1,158 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// PinnedRetriever type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type PinnedRetrieverVariant interface { + PinnedRetrieverCaster() *PinnedRetriever +} + +func (s *PinnedRetriever) PinnedRetrieverCaster() *PinnedRetriever { + return s +} diff --git a/typedapi/types/pipelineconfig.go b/typedapi/types/pipelineconfig.go index 04a3ee419f..7e8181a261 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PipelineConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Pipeline.ts#L67-L81 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f2cb740746..ec78cd513e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PipelineMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/logstash/_types/Pipeline.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/logstash/_types/Pipeline.ts#L23-L26 type PipelineMetadata struct { Type string `json:"type"` Version string `json:"version"` @@ -88,8 +88,6 @@ func NewPipelineMetadata() *PipelineMetadata { return r } -// true - type PipelineMetadataVariant interface { PipelineMetadataCaster() *PipelineMetadata } diff --git a/typedapi/types/pipelineprocessor.go b/typedapi/types/pipelineprocessor.go index 064f1f37ce..02306e383c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PipelineProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1285-L1296 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1285-L1296 type PipelineProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -146,8 +146,6 @@ func NewPipelineProcessor() *PipelineProcessor { return r } -// true - type PipelineProcessorVariant interface { PipelineProcessorCaster() *PipelineProcessor } 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 8c410dfd2f..d5105d771b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -28,23 +28,23 @@ import ( "io" "strconv" - "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/actionstatusoptions" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/pipelinesimulationstatusoptions" ) -// PipelineSimulation type. +// PipelineProcessorResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/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/907d11a72a6bfd37b777d526880c56202889609e/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 35ed464ef4..a98c251f19 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PipelineSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/logstash/_types/Pipeline.ts#L28-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -166,8 +166,6 @@ func NewPipelineSettings() *PipelineSettings { return r } -// true - type PipelineSettingsVariant interface { PipelineSettingsCaster() *PipelineSettings } diff --git a/typedapi/types/pipeseparatedflagssimplequerystringflag.go b/typedapi/types/pipeseparatedflagssimplequerystringflag.go index 6a261ab04f..542d271cd1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // simplequerystringflag.SimpleQueryStringFlag // string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_spec_utils/PipeSeparatedFlags.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/PipeSeparatedFlags.ts#L20-L27 type PipeSeparatedFlagsSimpleQueryStringFlag any type PipeSeparatedFlagsSimpleQueryStringFlagVariant interface { diff --git a/typedapi/types/pivot.go b/typedapi/types/pivot.go index 31beabf55d..349480bb97 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Pivot type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/_types/Transform.ts#L54-L68 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -48,8 +48,6 @@ func NewPivot() *Pivot { return r } -// true - type PivotVariant interface { PivotCaster() *Pivot } diff --git a/typedapi/types/pivotgroupbycontainer.go b/typedapi/types/pivotgroupbycontainer.go index 136bc6cf8f..a4805943d5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // PivotGroupByContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/_types/Transform.ts#L70-L78 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/transform/_types/Transform.ts#L70-L78 type PivotGroupByContainer struct { AdditionalPivotGroupByContainerProperty map[string]json.RawMessage `json:"-"` DateHistogram *DateHistogramAggregation `json:"date_histogram,omitempty"` @@ -74,8 +74,6 @@ func NewPivotGroupByContainer() *PivotGroupByContainer { return r } -// true - type PivotGroupByContainerVariant interface { PivotGroupByContainerCaster() *PivotGroupByContainer } diff --git a/typedapi/types/pluginsrecord.go b/typedapi/types/pluginsrecord.go index 4cffc77261..69f4b05e1e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PluginsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/plugins/types.ts#L22-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 79cd40e8ca..6fb58e1ba2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // PluginsStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L60-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f9278e94b2..4947de5b5c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PluginStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L185-L195 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L207-L217 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 ac43c282bb..ff59c76dbb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // PointInTimeReference type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/PointInTimeReference.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/PointInTimeReference.ts#L23-L26 type PointInTimeReference struct { Id string `json:"id"` KeepAlive Duration `json:"keep_alive,omitempty"` @@ -73,8 +73,6 @@ func NewPointInTimeReference() *PointInTimeReference { return r } -// true - type PointInTimeReferenceVariant interface { PointInTimeReferenceCaster() *PointInTimeReference } diff --git a/typedapi/types/pointproperty.go b/typedapi/types/pointproperty.go index 55d54ab214..c16538edff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // PointProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/geo.ts#L67-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -892,8 +904,6 @@ func NewPointProperty() *PointProperty { return r } -// true - type PointPropertyVariant interface { PointPropertyCaster() *PointProperty } @@ -901,3 +911,8 @@ type PointPropertyVariant interface { func (s *PointProperty) PointPropertyCaster() *PointProperty { return s } + +func (s *PointProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/pool.go b/typedapi/types/pool.go index b6fddd4a4a..c165e37912 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Pool type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L949-L966 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bfe87a542c..6cc7033a50 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // PorterStemTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L293-L295 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L393-L395 type PorterStemTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -86,8 +86,6 @@ func NewPorterStemTokenFilter() *PorterStemTokenFilter { return r } -// true - type PorterStemTokenFilterVariant interface { PorterStemTokenFilterCaster() *PorterStemTokenFilter } @@ -95,3 +93,8 @@ type PorterStemTokenFilterVariant interface { func (s *PorterStemTokenFilter) PorterStemTokenFilterCaster() *PorterStemTokenFilter { return s } + +func (s *PorterStemTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/portugueseanalyzer.go b/typedapi/types/portugueseanalyzer.go index 148b62bc70..59c5f21978 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // PortugueseAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L261-L266 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L261-L266 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": @@ -119,8 +108,6 @@ func NewPortugueseAnalyzer() *PortugueseAnalyzer { return r } -// true - type PortugueseAnalyzerVariant interface { PortugueseAnalyzerCaster() *PortugueseAnalyzer } @@ -128,3 +115,8 @@ type PortugueseAnalyzerVariant interface { func (s *PortugueseAnalyzer) PortugueseAnalyzerCaster() *PortugueseAnalyzer { return s } + +func (s *PortugueseAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/postmigrationfeature.go b/typedapi/types/postmigrationfeature.go index edd2e2a6aa..59f9fa5f54 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PostMigrationFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/migration/post_feature_upgrade/PostFeatureUpgradeResponse.ts#L27-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4922b1aae3..23681aeab2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,8 +30,10 @@ import ( // PredicateTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L297-L300 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -93,8 +95,6 @@ func NewPredicateTokenFilter() *PredicateTokenFilter { return r } -// true - type PredicateTokenFilterVariant interface { PredicateTokenFilterCaster() *PredicateTokenFilter } @@ -102,3 +102,8 @@ type PredicateTokenFilterVariant interface { func (s *PredicateTokenFilter) PredicateTokenFilterCaster() *PredicateTokenFilter { return s } + +func (s *PredicateTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/predictedvalue.go b/typedapi/types/predictedvalue.go index 1f387b63f5..c84f7b1967 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // PredictedValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L476-L476 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L476-L476 type PredictedValue []ScalarValue diff --git a/typedapi/types/prefixquery.go b/typedapi/types/prefixquery.go index afb48002d2..356bb23a34 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PrefixQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L98-L120 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -149,8 +149,6 @@ func NewPrefixQuery() *PrefixQuery { return r } -// true - type PrefixQueryVariant interface { PrefixQueryCaster() *PrefixQuery } diff --git a/typedapi/types/preprocessor.go b/typedapi/types/preprocessor.go index 7d32b723c2..ec810d2d20 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // Preprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/types.ts#L31-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L31-L36 type Preprocessor struct { AdditionalPreprocessorProperty map[string]json.RawMessage `json:"-"` FrequencyEncoding *FrequencyEncodingPreprocessor `json:"frequency_encoding,omitempty"` @@ -73,8 +73,6 @@ func NewPreprocessor() *Preprocessor { return r } -// true - type PreprocessorVariant interface { PreprocessorCaster() *Preprocessor } diff --git a/typedapi/types/pressurememory.go b/typedapi/types/pressurememory.go index 3bb3e85678..53e48e72cd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PressureMemory type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L144-L199 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9d237dbdb9..05f3d99d95 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Privileges type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/has_privileges/types.ts#L49-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 99781b7df3..1268f44100 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PrivilegesActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/put_privileges/types.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/put_privileges/types.ts#L22-L27 type PrivilegesActions struct { Actions []string `json:"actions"` Application *string `json:"application,omitempty"` @@ -93,8 +93,6 @@ func NewPrivilegesActions() *PrivilegesActions { return r } -// true - type PrivilegesActionsVariant interface { PrivilegesActionsCaster() *PrivilegesActions } diff --git a/typedapi/types/privilegescheck.go b/typedapi/types/privilegescheck.go index e526bc5fc9..2847a14c65 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // PrivilegesCheck type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/has_privileges_user_profile/types.ts#L30-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -41,8 +41,6 @@ func NewPrivilegesCheck() *PrivilegesCheck { return r } -// true - type PrivilegesCheckVariant interface { PrivilegesCheckCaster() *PrivilegesCheck } diff --git a/typedapi/types/process.go b/typedapi/types/process.go index 7421a00722..e659b4c7ab 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Process type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L1024-L1046 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 394bd3a481..182b38575e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Processor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L420-L437 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1f21bcdba9..4855371b43 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // ProcessorContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L28-L302 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L28-L302 type ProcessorContainer struct { AdditionalProcessorContainerProperty map[string]json.RawMessage `json:"-"` // Append Appends one or more values to an existing array if the field already exists @@ -255,8 +255,6 @@ func NewProcessorContainer() *ProcessorContainer { return r } -// true - type ProcessorContainerVariant interface { ProcessorContainerCaster() *ProcessorContainer } diff --git a/typedapi/types/profile.go b/typedapi/types/profile.go index b4994c5966..dc2a4a0423 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Profile type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L101-L103 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e9729b9b91..df9eb049c2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -43,6 +43,7 @@ package types // NestedProperty // ObjectProperty // PassthroughObjectProperty +// RankVectorProperty // SemanticTextProperty // SparseVectorProperty // CompletionProperty @@ -74,7 +75,7 @@ package types // LongRangeProperty // IcuCollationProperty // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/Property.ts#L119-L189 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/Property.ts#L120-L191 type Property any type PropertyVariant interface { diff --git a/typedapi/types/publishedclusterstates.go b/typedapi/types/publishedclusterstates.go index 83d5051e87..e03de42d2e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // PublishedClusterStates type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L263-L276 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c4bd2c4b9e..a3ee2410b7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Queries type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L417-L419 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L430-L432 type Queries struct { Cache *CacheQueries `json:"cache,omitempty"` } @@ -34,8 +34,6 @@ func NewQueries() *Queries { return r } -// true - type QueriesVariant interface { QueriesCaster() *Queries } diff --git a/typedapi/types/query.go b/typedapi/types/query.go index 7194c31caa..ad307c0062 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Query type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/abstractions.ts#L103-L434 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -668,8 +668,6 @@ func NewQuery() *Query { return r } -// true - type QueryVariant interface { QueryCaster() *Query } @@ -677,3 +675,13 @@ type QueryVariant interface { func (s *Query) QueryCaster() *Query { return s } + +func (s *Query) IndicesPrivilegesQueryCaster() *IndicesPrivilegesQuery { + o := IndicesPrivilegesQuery(s) + return &o +} + +func (s *Query) RoleTemplateInlineQueryCaster() *RoleTemplateInlineQuery { + o := RoleTemplateInlineQuery(s) + return &o +} diff --git a/typedapi/types/querybreakdown.go b/typedapi/types/querybreakdown.go index ffef1db8ee..acba87bc82 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // QueryBreakdown type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L105-L126 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f91e02acf8..442a01d606 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // QueryCacheStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L197-L231 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L219-L253 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 9f94a5b46a..32ea1221be 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // QueryFeatureExtractor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L98-L105 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L98-L105 type QueryFeatureExtractor struct { DefaultScore *float32 `json:"default_score,omitempty"` FeatureName string `json:"feature_name"` @@ -98,8 +98,6 @@ func NewQueryFeatureExtractor() *QueryFeatureExtractor { return r } -// true - type QueryFeatureExtractorVariant interface { QueryFeatureExtractorCaster() *QueryFeatureExtractor } diff --git a/typedapi/types/queryprofile.go b/typedapi/types/queryprofile.go index 87725aa528..021db903b4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // QueryProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L128-L134 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fa1be3d13d..056394e57d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // QueryRole type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_role/types.ts#L103-L109 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3fb911fb60..6faf1b7d68 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // QueryRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/_types/QueryRuleset.ts#L36-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -126,8 +126,6 @@ func NewQueryRule() *QueryRule { return r } -// true - type QueryRuleVariant interface { QueryRuleCaster() *QueryRule } diff --git a/typedapi/types/queryruleactions.go b/typedapi/types/queryruleactions.go index a13fe5b641..51e22f2378 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // QueryRuleActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/_types/QueryRuleset.ts#L110-L126 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -46,8 +46,6 @@ func NewQueryRuleActions() *QueryRuleActions { return r } -// true - type QueryRuleActionsVariant interface { QueryRuleActionsCaster() *QueryRuleActions } diff --git a/typedapi/types/queryrulecriteria.go b/typedapi/types/queryrulecriteria.go index 8c55bb83ad..19987d3b65 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // QueryRuleCriteria type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/_types/QueryRuleset.ts#L65-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -118,8 +118,6 @@ func NewQueryRuleCriteria() *QueryRuleCriteria { return r } -// true - type QueryRuleCriteriaVariant interface { QueryRuleCriteriaCaster() *QueryRuleCriteria } diff --git a/typedapi/types/queryrulesetlistitem.go b/typedapi/types/queryrulesetlistitem.go index e5dc05efbd..76fc9ac0a2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // QueryRulesetListItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/list_rulesets/types.ts#L23-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c6c8d21805..9c18d9dd1f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // QueryRulesetMatchedRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/query_rules/test/QueryRulesetTestResponse.ts#L30-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e40d91475f..2c3b12ccfd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // QueryStringQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L598-L721 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -434,8 +434,6 @@ func NewQueryStringQuery() *QueryStringQuery { return r } -// true - type QueryStringQueryVariant interface { QueryStringQueryCaster() *QueryStringQuery } diff --git a/typedapi/types/queryuser.go b/typedapi/types/queryuser.go index c7fc391f63..569aee4976 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // QueryUser type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_user/types.ts#L103-L105 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 13d77b8350..5464bf47f5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // QueryVectorBuilder type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Knn.ts#L89-L92 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Knn.ts#L89-L92 type QueryVectorBuilder struct { AdditionalQueryVectorBuilderProperty map[string]json.RawMessage `json:"-"` TextEmbedding *TextEmbedding `json:"text_embedding,omitempty"` @@ -71,8 +71,6 @@ func NewQueryVectorBuilder() *QueryVectorBuilder { return r } -// true - type QueryVectorBuilderVariant interface { QueryVectorBuilderCaster() *QueryVectorBuilder } diff --git a/typedapi/types/querywatch.go b/typedapi/types/querywatch.go index 6d234312cc..c2753cef46 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // QueryWatch type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Watch.ts#L58-L64 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 32aea3bfc4..8029f482b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // QuestionAnsweringInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L301-L311 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L301-L311 type QuestionAnsweringInferenceOptions struct { // MaxAnswerLength The maximum answer length to consider MaxAnswerLength *int `json:"max_answer_length,omitempty"` @@ -120,8 +120,6 @@ func NewQuestionAnsweringInferenceOptions() *QuestionAnsweringInferenceOptions { return r } -// true - type QuestionAnsweringInferenceOptionsVariant interface { QuestionAnsweringInferenceOptionsCaster() *QuestionAnsweringInferenceOptions } diff --git a/typedapi/types/questionansweringinferenceupdateoptions.go b/typedapi/types/questionansweringinferenceupdateoptions.go index fe4e7cce31..0d2cdbf13d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // QuestionAnsweringInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L439-L450 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -134,8 +134,6 @@ func NewQuestionAnsweringInferenceUpdateOptions() *QuestionAnsweringInferenceUpd return r } -// true - type QuestionAnsweringInferenceUpdateOptionsVariant interface { QuestionAnsweringInferenceUpdateOptionsCaster() *QuestionAnsweringInferenceUpdateOptions } diff --git a/typedapi/types/randomsampleraggregation.go b/typedapi/types/randomsampleraggregation.go index 61790ffe0f..33ada2381a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RandomSamplerAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L749-L769 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -121,8 +121,6 @@ func NewRandomSamplerAggregation() *RandomSamplerAggregation { return r } -// true - type RandomSamplerAggregationVariant interface { RandomSamplerAggregationCaster() *RandomSamplerAggregation } diff --git a/typedapi/types/randomscorefunction.go b/typedapi/types/randomscorefunction.go index 1fc9728f4e..4cafe4ace8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,10 +31,10 @@ import ( // RandomScoreFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L144-L147 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 } } @@ -81,8 +81,6 @@ func NewRandomScoreFunction() *RandomScoreFunction { return r } -// true - type RandomScoreFunctionVariant interface { RandomScoreFunctionCaster() *RandomScoreFunction } diff --git a/typedapi/types/rangeaggregate.go b/typedapi/types/rangeaggregate.go index 2b98d8f70d..c7ef038900 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // RangeAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L594-L598 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a3c9c4c8d9..85e7207aff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RangeAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L669-L689 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -131,8 +131,6 @@ func NewRangeAggregation() *RangeAggregation { return r } -// true - type RangeAggregationVariant interface { RangeAggregationCaster() *RangeAggregation } diff --git a/typedapi/types/rangebucket.go b/typedapi/types/rangebucket.go index 77857854e7..1321069ee4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // RangeBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L600-L607 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a1f6c5c9cc..ef913f24fa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ package types // NumberRangeQuery // TermRangeQuery // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L176-L186 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L172-L182 type RangeQuery any type RangeQueryVariant interface { diff --git a/typedapi/types/rankcontainer.go b/typedapi/types/rankcontainer.go index 3437474e20..a3244e5070 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // RankContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Rank.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Rank.ts#L22-L28 type RankContainer struct { AdditionalRankContainerProperty map[string]json.RawMessage `json:"-"` // Rrf The reciprocal rank fusion parameters @@ -72,8 +72,6 @@ func NewRankContainer() *RankContainer { return r } -// true - type RankContainerVariant interface { RankContainerCaster() *RankContainer } diff --git a/typedapi/types/rankeddocument.go b/typedapi/types/rankeddocument.go index fc985ae625..eab9113a1b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankedDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/Results.ts#L91-L101 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 250e7994d9..3c35777f9f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankEvalHit type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L144-L148 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fa93d4f31d..f01dcc034f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // RankEvalHitItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L139-L142 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8931d8fc44..4f3f5ebdcd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // RankEvalMetric type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L90-L96 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L90-L96 type RankEvalMetric struct { Dcg *RankEvalMetricDiscountedCumulativeGain `json:"dcg,omitempty"` ExpectedReciprocalRank *RankEvalMetricExpectedReciprocalRank `json:"expected_reciprocal_rank,omitempty"` @@ -38,8 +38,6 @@ func NewRankEvalMetric() *RankEvalMetric { return r } -// true - type RankEvalMetricVariant interface { RankEvalMetricCaster() *RankEvalMetric } diff --git a/typedapi/types/rankevalmetricdetail.go b/typedapi/types/rankevalmetricdetail.go index 732c52af0f..3fe2e08888 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L128-L137 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9e35b8415b..32c8ccbff0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricDiscountedCumulativeGain type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L66-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -97,8 +97,6 @@ func NewRankEvalMetricDiscountedCumulativeGain() *RankEvalMetricDiscountedCumula return r } -// true - type RankEvalMetricDiscountedCumulativeGainVariant interface { RankEvalMetricDiscountedCumulativeGainCaster() *RankEvalMetricDiscountedCumulativeGain } diff --git a/typedapi/types/rankevalmetricexpectedreciprocalrank.go b/typedapi/types/rankevalmetricexpectedreciprocalrank.go index 65f8234a15..744a51dca6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricExpectedReciprocalRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L79-L88 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -99,8 +99,6 @@ func NewRankEvalMetricExpectedReciprocalRank() *RankEvalMetricExpectedReciprocal return r } -// true - type RankEvalMetricExpectedReciprocalRankVariant interface { RankEvalMetricExpectedReciprocalRankCaster() *RankEvalMetricExpectedReciprocalRank } diff --git a/typedapi/types/rankevalmetricmeanreciprocalrank.go b/typedapi/types/rankevalmetricmeanreciprocalrank.go index a557e6b1ee..377fc33a48 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricMeanReciprocalRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L60-L64 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -100,8 +100,6 @@ func NewRankEvalMetricMeanReciprocalRank() *RankEvalMetricMeanReciprocalRank { return r } -// true - type RankEvalMetricMeanReciprocalRankVariant interface { RankEvalMetricMeanReciprocalRankCaster() *RankEvalMetricMeanReciprocalRank } diff --git a/typedapi/types/rankevalmetricprecision.go b/typedapi/types/rankevalmetricprecision.go index 0b8fabbeb5..8bec79e3cf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricPrecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L42-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -118,8 +118,6 @@ func NewRankEvalMetricPrecision() *RankEvalMetricPrecision { return r } -// true - type RankEvalMetricPrecisionVariant interface { RankEvalMetricPrecisionCaster() *RankEvalMetricPrecision } diff --git a/typedapi/types/rankevalmetricrecall.go b/typedapi/types/rankevalmetricrecall.go index a5c4b24d25..8513f2f112 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankEvalMetricRecall type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L54-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -100,8 +100,6 @@ func NewRankEvalMetricRecall() *RankEvalMetricRecall { return r } -// true - type RankEvalMetricRecallVariant interface { RankEvalMetricRecallCaster() *RankEvalMetricRecall } diff --git a/typedapi/types/rankevalquery.go b/typedapi/types/rankevalquery.go index 8226789b6b..77b8e10e91 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankEvalQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L111-L117 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/rank_eval/types.ts#L111-L117 type RankEvalQuery struct { Query Query `json:"query"` Size *int `json:"size,omitempty"` @@ -90,8 +90,6 @@ func NewRankEvalQuery() *RankEvalQuery { return r } -// true - type RankEvalQueryVariant interface { RankEvalQueryCaster() *RankEvalQuery } diff --git a/typedapi/types/rankevalrequestitem.go b/typedapi/types/rankevalrequestitem.go index dbc9edd785..a2bff2c918 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // RankEvalRequestItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L98-L109 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -101,8 +101,6 @@ func NewRankEvalRequestItem() *RankEvalRequestItem { return r } -// true - type RankEvalRequestItemVariant interface { RankEvalRequestItemCaster() *RankEvalRequestItem } diff --git a/typedapi/types/rankfeaturefunctionlinear.go b/typedapi/types/rankfeaturefunctionlinear.go index 447cd2a637..74fbe2c5d5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // RankFeatureFunctionLinear type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L282-L282 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L282-L282 type RankFeatureFunctionLinear struct { } @@ -33,8 +33,6 @@ func NewRankFeatureFunctionLinear() *RankFeatureFunctionLinear { return r } -// true - type RankFeatureFunctionLinearVariant interface { RankFeatureFunctionLinearCaster() *RankFeatureFunctionLinear } diff --git a/typedapi/types/rankfeaturefunctionlogarithm.go b/typedapi/types/rankfeaturefunctionlogarithm.go index bd3a6b0df0..83933e7798 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankFeatureFunctionLogarithm type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L284-L289 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L284-L289 type RankFeatureFunctionLogarithm struct { // ScalingFactor Configurable scaling factor. ScalingFactor float32 `json:"scaling_factor"` @@ -80,8 +80,6 @@ func NewRankFeatureFunctionLogarithm() *RankFeatureFunctionLogarithm { return r } -// true - type RankFeatureFunctionLogarithmVariant interface { RankFeatureFunctionLogarithmCaster() *RankFeatureFunctionLogarithm } diff --git a/typedapi/types/rankfeaturefunctionsaturation.go b/typedapi/types/rankfeaturefunctionsaturation.go index 21ac5ea48b..1e249b229d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankFeatureFunctionSaturation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L291-L296 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -80,8 +80,6 @@ func NewRankFeatureFunctionSaturation() *RankFeatureFunctionSaturation { return r } -// true - type RankFeatureFunctionSaturationVariant interface { RankFeatureFunctionSaturationCaster() *RankFeatureFunctionSaturation } diff --git a/typedapi/types/rankfeaturefunctionsigmoid.go b/typedapi/types/rankfeaturefunctionsigmoid.go index e0f97bbe46..b765511c20 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankFeatureFunctionSigmoid type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L298-L307 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L298-L307 type RankFeatureFunctionSigmoid struct { // Exponent Configurable Exponent. Exponent float32 `json:"exponent"` @@ -98,8 +98,6 @@ func NewRankFeatureFunctionSigmoid() *RankFeatureFunctionSigmoid { return r } -// true - type RankFeatureFunctionSigmoidVariant interface { RankFeatureFunctionSigmoidCaster() *RankFeatureFunctionSigmoid } diff --git a/typedapi/types/rankfeatureproperty.go b/typedapi/types/rankfeatureproperty.go index e2239e84cf..9065345644 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // RankFeatureProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L206-L209 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L207-L210 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 { @@ -812,8 +824,6 @@ func NewRankFeatureProperty() *RankFeatureProperty { return r } -// true - type RankFeaturePropertyVariant interface { RankFeaturePropertyCaster() *RankFeatureProperty } @@ -821,3 +831,8 @@ type RankFeaturePropertyVariant interface { func (s *RankFeatureProperty) RankFeaturePropertyCaster() *RankFeatureProperty { return s } + +func (s *RankFeatureProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/rankfeaturequery.go b/typedapi/types/rankfeaturequery.go index cc231eb127..6ea25caf57 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RankFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L309-L335 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -136,8 +136,6 @@ func NewRankFeatureQuery() *RankFeatureQuery { return r } -// true - type RankFeatureQueryVariant interface { RankFeatureQueryCaster() *RankFeatureQuery } diff --git a/typedapi/types/rankfeaturesproperty.go b/typedapi/types/rankfeaturesproperty.go index 3607df2bd9..846d322b9f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // RankFeaturesProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L211-L214 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L212-L215 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 { @@ -812,8 +824,6 @@ func NewRankFeaturesProperty() *RankFeaturesProperty { return r } -// true - type RankFeaturesPropertyVariant interface { RankFeaturesPropertyCaster() *RankFeaturesProperty } @@ -821,3 +831,8 @@ type RankFeaturesPropertyVariant interface { func (s *RankFeaturesProperty) RankFeaturesPropertyCaster() *RankFeaturesProperty { return s } + +func (s *RankFeaturesProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/rankvectorproperty.go b/typedapi/types/rankvectorproperty.go new file mode 100644 index 0000000000..48796a5997 --- /dev/null +++ b/typedapi/types/rankvectorproperty.go @@ -0,0 +1,848 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/dynamicmapping" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/rankvectorelementtype" + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/syntheticsourcekeepenum" +) + +// RankVectorProperty type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L217-L224 +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 +} + +type RankVectorPropertyVariant interface { + RankVectorPropertyCaster() *RankVectorProperty +} + +func (s *RankVectorProperty) RankVectorPropertyCaster() *RankVectorProperty { + return s +} + +func (s *RankVectorProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/raretermsaggregation.go b/typedapi/types/raretermsaggregation.go index c625c76eea..24cfccded7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RareTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L706-L739 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L706-L739 type RareTermsAggregation struct { // Exclude Terms that should be excluded from the aggregation. Exclude []string `json:"exclude,omitempty"` @@ -182,8 +182,6 @@ func NewRareTermsAggregation() *RareTermsAggregation { return r } -// true - type RareTermsAggregationVariant interface { RareTermsAggregationCaster() *RareTermsAggregation } diff --git a/typedapi/types/rateaggregate.go b/typedapi/types/rateaggregate.go index 10d322aa43..981abafbe6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RateAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L847-L854 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 03db55c1bd..ce7a9f1e12 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // RateAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L239-L250 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L262-L273 type RateAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -114,8 +114,6 @@ func NewRateAggregation() *RateAggregation { return r } -// true - type RateAggregationVariant interface { RateAggregationCaster() *RateAggregation } diff --git a/typedapi/types/ratelimitsetting.go b/typedapi/types/ratelimitsetting.go index e4f922b2d2..073315fa9e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,9 +31,28 @@ import ( // RateLimitSetting type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/Services.ts#L95-L100 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/Services.ts#L323-L349 type RateLimitSetting struct { // RequestsPerMinute The number of requests allowed per minute. + // By default, the number of requests allowed per minute is set by each service + // as follows: + // + // * `alibabacloud-ai-search` service: `1000` + // * `anthropic` service: `50` + // * `azureaistudio` service: `240` + // * `azureopenai` service and task type `text_embedding`: `1440` + // * `azureopenai` service and task type `completion`: `120` + // * `cohere` service: `10000` + // * `elastic` service and task type `chat_completion`: `240` + // * `googleaistudio` service: `360` + // * `googlevertexai` service: `30000` + // * `hugging_face` service: `3000` + // * `jinaai` service: `2000` + // * `mistral` service: `240` + // * `openai` service and task type `text_embedding`: `3000` + // * `openai` service and task type `completion`: `500` + // * `voyageai` service: `2000` + // * `watsonxai` service: `120` RequestsPerMinute *int `json:"requests_per_minute,omitempty"` } @@ -80,8 +99,6 @@ func NewRateLimitSetting() *RateLimitSetting { return r } -// true - type RateLimitSettingVariant interface { RateLimitSettingCaster() *RateLimitSetting } diff --git a/typedapi/types/readblobdetails.go b/typedapi/types/readblobdetails.go index 72ea4adc84..5ba218c3ae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ReadBlobDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L204-L248 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 654da665f2..ff572275b4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ReadException type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ccr/_types/FollowIndexStats.ts#L111-L118 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 60bac7f58c..d6402f6658 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ReadOnlyUrlRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L92-L102 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L92-L102 type ReadOnlyUrlRepository struct { // Settings The repository settings. Settings ReadOnlyUrlRepositorySettings `json:"settings"` @@ -95,8 +95,6 @@ func NewReadOnlyUrlRepository() *ReadOnlyUrlRepository { return r } -// true - type ReadOnlyUrlRepositoryVariant interface { ReadOnlyUrlRepositoryCaster() *ReadOnlyUrlRepository } @@ -104,3 +102,8 @@ type ReadOnlyUrlRepositoryVariant interface { func (s *ReadOnlyUrlRepository) ReadOnlyUrlRepositoryCaster() *ReadOnlyUrlRepository { return s } + +func (s *ReadOnlyUrlRepository) RepositoryCaster() *Repository { + o := Repository(s) + return &o +} diff --git a/typedapi/types/readonlyurlrepositorysettings.go b/typedapi/types/readonlyurlrepositorysettings.go index ff5f097397..3eeb94912c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ReadOnlyUrlRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L377-L412 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L377-L412 type ReadOnlyUrlRepositorySettings struct { // ChunkSize Big files can be broken down into multiple smaller blobs in the blob store // during snapshotting. @@ -192,8 +192,6 @@ func NewReadOnlyUrlRepositorySettings() *ReadOnlyUrlRepositorySettings { return r } -// true - type ReadOnlyUrlRepositorySettingsVariant interface { ReadOnlyUrlRepositorySettingsCaster() *ReadOnlyUrlRepositorySettings } diff --git a/typedapi/types/readsummaryinfo.go b/typedapi/types/readsummaryinfo.go index 9502f504dc..fe66b7f19d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ReadSummaryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L115-L160 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 62bb67b808..3299ef367d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RealmCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L276-L278 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a3c3efdfd7..e57855fa82 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RealmInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/RealmInfo.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e09bc60b6d..edc2151847 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Recording type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L225-L230 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a39667b016..94ee7be29c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // RecoveryBytes type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/recovery/types.ts#L38-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fdbcd84137..47ba6493e5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RecoveryFiles type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/recovery/types.ts#L56-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8f73474e95..8fd844f95b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // RecoveryIndexStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/recovery/types.ts#L64-L74 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b3f4002d2b..fc2d9332a8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RecoveryOrigin type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/recovery/types.ts#L76-L89 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9b797735e9..40c8f54c23 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RecoveryRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/recovery/types.ts#L24-L155 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 67d1a0ab65..9381114859 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // RecoveryStartStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/recovery/types.ts#L91-L96 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 76e17402ad..0f0b78ce0a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RecoveryStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L233-L238 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L255-L260 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 4178dd9a0b..46dd815ddb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // RecoveryStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/recovery/types.ts#L98-L100 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 03361ef0b0..5bcc108c5c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Redact type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Simulation.ts#L39-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b78946cbdf..960e16e44e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RedactProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1298-L1339 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1298-L1339 type RedactProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -226,8 +226,6 @@ func NewRedactProcessor() *RedactProcessor { return r } -// true - type RedactProcessorVariant interface { RedactProcessorCaster() *RedactProcessor } diff --git a/typedapi/types/refreshstats.go b/typedapi/types/refreshstats.go index a98b85fb08..6be8ab5e6f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RefreshStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L240-L247 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L262-L269 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 716da0b8af..06c5017fae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,10 +31,10 @@ import ( // RegexOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L184-L195 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L184-L195 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": @@ -94,8 +94,6 @@ func NewRegexOptions() *RegexOptions { return r } -// true - type RegexOptionsVariant interface { RegexOptionsCaster() *RegexOptions } diff --git a/typedapi/types/regexpquery.go b/typedapi/types/regexpquery.go index 393a79e670..5e8c851b4a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RegexpQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L203-L236 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L199-L232 type RegexpQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -181,8 +181,6 @@ func NewRegexpQuery() *RegexpQuery { return r } -// true - type RegexpQueryVariant interface { RegexpQueryCaster() *RegexpQuery } diff --git a/typedapi/types/regexvalidation.go b/typedapi/types/regexvalidation.go index baaa2d6391..87da2848df 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RegexValidation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L78-L81 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L78-L81 type RegexValidation struct { Constraint string `json:"constraint"` Type string `json:"type,omitempty"` @@ -94,8 +94,6 @@ func NewRegexValidation() *RegexValidation { return r } -// true - type RegexValidationVariant interface { RegexValidationCaster() *RegexValidation } @@ -103,3 +101,8 @@ type RegexValidationVariant interface { func (s *RegexValidation) RegexValidationCaster() *RegexValidation { return s } + +func (s *RegexValidation) ValidationCaster() *Validation { + o := Validation(s) + return &o +} diff --git a/typedapi/types/registereddomainprocessor.go b/typedapi/types/registereddomainprocessor.go index bf71bfdbe0..3aaf8bea48 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RegisteredDomainProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1341-L1357 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1341-L1357 type RegisteredDomainProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -154,8 +154,6 @@ func NewRegisteredDomainProcessor() *RegisteredDomainProcessor { return r } -// true - type RegisteredDomainProcessorVariant interface { RegisteredDomainProcessorCaster() *RegisteredDomainProcessor } diff --git a/typedapi/types/regressioninferenceoptions.go b/typedapi/types/regressioninferenceoptions.go index e94e836b8c..4b6555fd22 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RegressionInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L107-L116 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -88,8 +88,6 @@ func NewRegressionInferenceOptions() *RegressionInferenceOptions { return r } -// true - type RegressionInferenceOptionsVariant interface { RegressionInferenceOptionsCaster() *RegressionInferenceOptions } diff --git a/typedapi/types/reindexdestination.go b/typedapi/types/reindexdestination.go index 87039dbcd9..f8b48dbb0f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // ReindexDestination type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/reindex/types.ts#L39-L67 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -118,8 +118,6 @@ func NewReindexDestination() *ReindexDestination { return r } -// true - type ReindexDestinationVariant interface { ReindexDestinationCaster() *ReindexDestination } diff --git a/typedapi/types/reindexnode.go b/typedapi/types/reindexnode.go index 96f10ff9db..d70ade0f09 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // ReindexNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/reindex_rethrottle/types.ts#L33-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 aa796bd612..544b5a8193 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ReindexSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/reindex/types.ts#L69-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -176,8 +176,6 @@ func NewReindexSource() *ReindexSource { return r } -// true - type ReindexSourceVariant interface { ReindexSourceCaster() *ReindexSource } diff --git a/typedapi/types/reindexstatus.go b/typedapi/types/reindexstatus.go index 29877568d8..f84ee47693 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ReindexStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/reindex_rethrottle/types.ts#L37-L85 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4bd75a2bfc..a6af4d1d5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ReindexTask type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/reindex_rethrottle/types.ts#L87-L98 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ad3b8845ee..ac63bd4ab2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ReloadDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/reload_search_analyzers/types.ts#L27-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0f2e5657e9..d496a730d6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ReloadResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/reload_search_analyzers/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a76eb5354a..d22fe1380e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RelocationFailureInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Node.ts#L67-L69 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..bfd9d647a9 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/healthstatus" +) + +// RemoteClusterInfo type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a69fc45627..9441014afb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // RemoteClusterPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L280-L292 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L280-L292 type RemoteClusterPrivileges struct { // Clusters A list of cluster aliases to which the permissions in this entry apply. Clusters []string `json:"clusters"` @@ -89,8 +89,6 @@ func NewRemoteClusterPrivileges() *RemoteClusterPrivileges { return r } -// true - type RemoteClusterPrivilegesVariant interface { RemoteClusterPrivilegesCaster() *RemoteClusterPrivileges } diff --git a/typedapi/types/remoteindicesprivileges.go b/typedapi/types/remoteindicesprivileges.go index b5064e710a..f30658d373 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // RemoteIndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L246-L278 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L246-L278 type RemoteIndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited @@ -186,8 +186,6 @@ func NewRemoteIndicesPrivileges() *RemoteIndicesPrivileges { return r } -// true - type RemoteIndicesPrivilegesVariant interface { RemoteIndicesPrivilegesCaster() *RemoteIndicesPrivileges } diff --git a/typedapi/types/remotesource.go b/typedapi/types/remotesource.go index c48ace3254..c357c53ef7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // RemoteSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/reindex/types.ts#L112-L140 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/reindex/types.ts#L112-L140 type RemoteSource struct { // ConnectTimeout The remote connection timeout. ConnectTimeout Duration `json:"connect_timeout,omitempty"` @@ -109,8 +109,6 @@ func NewRemoteSource() *RemoteSource { return r } -// true - type RemoteSourceVariant interface { RemoteSourceCaster() *RemoteSource } diff --git a/typedapi/types/remoteuserindicesprivileges.go b/typedapi/types/remoteuserindicesprivileges.go index c8e7577764..af5c3a0c12 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // RemoteUserIndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L318-L341 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L318-L341 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 841b2e8149..4165cce268 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RemoveAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/update_aliases/types.ts#L97-L122 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/update_aliases/types.ts#L97-L122 type RemoveAction struct { // Alias Alias for the action. // Index alias names support date math. @@ -132,8 +132,6 @@ func NewRemoveAction() *RemoveAction { return r } -// true - type RemoveActionVariant interface { RemoveActionCaster() *RemoveAction } diff --git a/typedapi/types/removeclusterserver.go b/typedapi/types/removeclusterserver.go new file mode 100644 index 0000000000..b0dc6b8f77 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// RemoveClusterServer type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a82641b890..037463ac03 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // RemoveDuplicatesTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L302-L304 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L403-L405 type RemoveDuplicatesTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -86,8 +86,6 @@ func NewRemoveDuplicatesTokenFilter() *RemoveDuplicatesTokenFilter { return r } -// true - type RemoveDuplicatesTokenFilterVariant interface { RemoveDuplicatesTokenFilterCaster() *RemoveDuplicatesTokenFilter } @@ -95,3 +93,8 @@ type RemoveDuplicatesTokenFilterVariant interface { func (s *RemoveDuplicatesTokenFilter) RemoveDuplicatesTokenFilterCaster() *RemoveDuplicatesTokenFilter { return s } + +func (s *RemoveDuplicatesTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/removeindexaction.go b/typedapi/types/removeindexaction.go index 3321ad5917..396204c5cd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RemoveIndexAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/update_aliases/types.ts#L124-L139 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/update_aliases/types.ts#L124-L139 type RemoveIndexAction struct { // Index Data stream or index for the action. // Supports wildcards (`*`). @@ -105,8 +105,6 @@ func NewRemoveIndexAction() *RemoveIndexAction { return r } -// true - type RemoveIndexActionVariant interface { RemoveIndexActionCaster() *RemoveIndexAction } diff --git a/typedapi/types/removeindicesblockstatus.go b/typedapi/types/removeindicesblockstatus.go new file mode 100644 index 0000000000..73a2ccccf5 --- /dev/null +++ b/typedapi/types/removeindicesblockstatus.go @@ -0,0 +1,90 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RemoveIndicesBlockStatus type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/remove_block/IndicesRemoveBlockResponse.ts#L30-L34 +type RemoveIndicesBlockStatus struct { + Exception *ErrorCause `json:"exception,omitempty"` + Name string `json:"name"` + Unblocked *bool `json:"unblocked,omitempty"` +} + +func (s *RemoveIndicesBlockStatus) 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 "exception": + if err := dec.Decode(&s.Exception); err != nil { + return fmt.Errorf("%s | %w", "Exception", err) + } + + case "name": + if err := dec.Decode(&s.Name); err != nil { + return fmt.Errorf("%s | %w", "Name", err) + } + + case "unblocked": + 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", "Unblocked", err) + } + s.Unblocked = &value + case bool: + s.Unblocked = &v + } + + } + } + return nil +} + +// NewRemoveIndicesBlockStatus returns a RemoveIndicesBlockStatus. +func NewRemoveIndicesBlockStatus() *RemoveIndicesBlockStatus { + r := &RemoveIndicesBlockStatus{} + + return r +} diff --git a/typedapi/types/removeprocessor.go b/typedapi/types/removeprocessor.go index 13105d8304..4b70231e92 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RemoveProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1359-L1373 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1359-L1373 type RemoveProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -176,8 +176,6 @@ func NewRemoveProcessor() *RemoveProcessor { return r } -// true - type RemoveProcessorVariant interface { RemoveProcessorCaster() *RemoveProcessor } diff --git a/typedapi/types/renameprocessor.go b/typedapi/types/renameprocessor.go index 778a3ebc53..4f53726e42 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RenameProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1375-L1391 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1375-L1391 type RenameProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -155,8 +155,6 @@ func NewRenameProcessor() *RenameProcessor { return r } -// true - type RenameProcessorVariant interface { RenameProcessorCaster() *RenameProcessor } diff --git a/typedapi/types/replicationaccess.go b/typedapi/types/replicationaccess.go index fb59a77603..eeea7fbbe6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ReplicationAccess type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L444-L454 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L444-L454 type ReplicationAccess struct { // AllowRestrictedIndices This needs to be set to true if the patterns in the names field should cover // system indices. @@ -98,8 +98,6 @@ func NewReplicationAccess() *ReplicationAccess { return r } -// true - type ReplicationAccessVariant interface { ReplicationAccessCaster() *ReplicationAccess } diff --git a/typedapi/types/reportingemailattachment.go b/typedapi/types/reportingemailattachment.go index 9247e14ec8..5ee5851add 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ReportingEmailAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L224-L232 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L224-L232 type ReportingEmailAttachment struct { Inline *bool `json:"inline,omitempty"` Interval Duration `json:"interval,omitempty"` @@ -119,8 +119,6 @@ func NewReportingEmailAttachment() *ReportingEmailAttachment { return r } -// true - type ReportingEmailAttachmentVariant interface { ReportingEmailAttachmentCaster() *ReportingEmailAttachment } diff --git a/typedapi/types/repositoriesrecord.go b/typedapi/types/repositoriesrecord.go index 2559105531..cdc652a897 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RepositoriesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/repositories/types.ts#L20-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 165b6094d1..ea43e439f6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,7 +29,7 @@ package types // ReadOnlyUrlRepository // SourceOnlyRepository // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L24-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L24-L34 type Repository any type RepositoryVariant interface { diff --git a/typedapi/types/repositoryintegrityindicator.go b/typedapi/types/repositoryintegrityindicator.go index a959875d8c..0c623f8de3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // RepositoryIntegrityIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L137-L141 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L138-L142 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 e9ce87f6c8..0958d6f095 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RepositoryIntegrityIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L142-L146 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L143-L147 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 1af0db4f91..e8ff0c7e5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RepositoryLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/RepositoryMeteringInformation.ts#L68-L74 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9f1515eb6f..0bdd2a01df 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RepositoryMeteringInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/RepositoryMeteringInformation.ts#L24-L66 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..941661696f --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RepositoryStatsCurrentCounts type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..edd212ff91 --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/shardstate" +) + +// RepositoryStatsShards type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 28d30e0ab8..2b54388de1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RequestCacheStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L249-L255 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L271-L277 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 bcb6107b08..c526aa0d70 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,16 @@ import ( // RequestChatCompletion type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L25-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -190,8 +238,6 @@ func NewRequestChatCompletion() *RequestChatCompletion { return r } -// true - type RequestChatCompletionVariant interface { RequestChatCompletionCaster() *RequestChatCompletion } diff --git a/typedapi/types/requestcounts.go b/typedapi/types/requestcounts.go index 29bc11eee2..ebe6451773 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RequestCounts type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/RepositoryMeteringInformation.ts#L76-L103 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 95621f064f..bd317e4f00 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // MultisearchHeader // TemplateConfig // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/msearch_template/types.ts#L26-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch_template/types.ts#L26-L27 type RequestItem any type RequestItemVariant interface { diff --git a/typedapi/types/reroutedecision.go b/typedapi/types/reroutedecision.go index 8539cfc2ed..b97312f40d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RerouteDecision type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/reroute/types.ts#L86-L90 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4eff7be908..6f4cdbcf44 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RerouteExplanation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/reroute/types.ts#L92-L96 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 56e415d26b..417a4ad679 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RerouteParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/reroute/types.ts#L98-L105 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9f2a35f549..51a158d88d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RerouteProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1393-L1421 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1393-L1421 type RerouteProcessor struct { // Dataset Field references or a static value for the dataset part of the data stream // name. @@ -197,8 +197,6 @@ func NewRerouteProcessor() *RerouteProcessor { return r } -// true - type RerouteProcessorVariant interface { RerouteProcessorCaster() *RerouteProcessor } diff --git a/typedapi/types/rescore.go b/typedapi/types/rescore.go index f144a4a096..dee6b6998f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Rescore type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/rescoring.ts#L25-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/rescoring.ts#L25-L38 type Rescore struct { AdditionalRescoreProperty map[string]json.RawMessage `json:"-"` LearningToRank *LearningToRank `json:"learning_to_rank,omitempty"` @@ -136,8 +136,6 @@ func NewRescore() *Rescore { return r } -// true - type RescoreVariant interface { RescoreCaster() *Rescore } diff --git a/typedapi/types/rescorequery.go b/typedapi/types/rescorequery.go index 885feaa3b0..030f8ccd55 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // RescoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/rescoring.ts#L40-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -116,8 +116,6 @@ func NewRescoreQuery() *RescoreQuery { return r } -// true - type RescoreQueryVariant interface { RescoreQueryCaster() *RescoreQuery } diff --git a/typedapi/types/rescorerretriever.go b/typedapi/types/rescorerretriever.go new file mode 100644 index 0000000000..9d9acb3cb8 --- /dev/null +++ b/typedapi/types/rescorerretriever.go @@ -0,0 +1,146 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// RescorerRetriever type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type RescorerRetrieverVariant interface { + RescorerRetrieverCaster() *RescorerRetriever +} + +func (s *RescorerRetriever) RescorerRetrieverCaster() *RescorerRetriever { + return s +} diff --git a/typedapi/types/rescorevector.go b/typedapi/types/rescorevector.go index 3edc56a1e6..3432da68eb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RescoreVector type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Knn.ts#L30-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -80,8 +80,6 @@ func NewRescoreVector() *RescoreVector { return r } -// true - type RescoreVectorVariant interface { RescoreVectorCaster() *RescoreVector } diff --git a/typedapi/types/reservedsize.go b/typedapi/types/reservedsize.go index 38d1221df8..ef55b2be1b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ReservedSize type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/types.ts#L72-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3bec52721b..d0429a958f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ResolveClusterInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/resolve_cluster/ResolveClusterResponse.ts#L29-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9f465353bd..6aaf1b6fae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ResolveIndexAliasItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/resolve_index/ResolveIndexResponse.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fe95ae018c..478f7afa96 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ResolveIndexDataStreamsItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/resolve_index/ResolveIndexResponse.ts#L42-L46 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4adf04c677..7a08e0de7a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ResolveIndexItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/resolve_index/ResolveIndexResponse.ts#L30-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 28c736d43a..03533aced2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ResourcePrivileges type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/has_privileges/types.ts#L48-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d48b51a7cd..0b824fb730 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ResponseItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/bulk/types.ts#L37-L84 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7a689c2d3e..ed2e604fea 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // Restriction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/RoleDescriptor.ts#L135-L141 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -41,8 +41,6 @@ func NewRestriction() *Restriction { return r } -// true - type RestrictionVariant interface { RestrictionCaster() *Restriction } diff --git a/typedapi/types/retention.go b/typedapi/types/retention.go index 6e0218261a..87baad5b3a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Retention type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/_types/SnapshotLifecycle.ts#L94-L107 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -108,8 +108,6 @@ func NewRetention() *Retention { return r } -// true - type RetentionVariant interface { RetentionCaster() *Retention } diff --git a/typedapi/types/retentionlease.go b/typedapi/types/retentionlease.go index 7a80a42aa6..fe7e6a8c76 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // RetentionLease type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L66-L68 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L66-L68 type RetentionLease struct { Period Duration `json:"period"` } @@ -67,8 +67,6 @@ func NewRetentionLease() *RetentionLease { return r } -// true - type RetentionLeaseVariant interface { RetentionLeaseCaster() *RetentionLease } diff --git a/typedapi/types/retentionpolicy.go b/typedapi/types/retentionpolicy.go index aade6067e4..ad925a4760 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // RetentionPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/_types/Transform.ts#L88-L96 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -77,8 +77,6 @@ func NewRetentionPolicy() *RetentionPolicy { return r } -// true - type RetentionPolicyVariant interface { RetentionPolicyCaster() *RetentionPolicy } diff --git a/typedapi/types/retentionpolicycontainer.go b/typedapi/types/retentionpolicycontainer.go index 2828544d5f..becee54174 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // RetentionPolicyContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/_types/Transform.ts#L80-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -72,8 +72,6 @@ func NewRetentionPolicyContainer() *RetentionPolicyContainer { return r } -// true - type RetentionPolicyContainerVariant interface { RetentionPolicyContainerCaster() *RetentionPolicyContainer } diff --git a/typedapi/types/retries.go b/typedapi/types/retries.go index 69ff148b38..8355c4b011 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Retries type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Retries.ts#L22-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 74154ff514..87af7846dd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,11 +27,19 @@ import ( // RetrieverContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Retriever.ts#L28-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -81,8 +89,6 @@ func NewRetrieverContainer() *RetrieverContainer { return r } -// true - type RetrieverContainerVariant interface { RetrieverContainerCaster() *RetrieverContainer } diff --git a/typedapi/types/reversenestedaggregate.go b/typedapi/types/reversenestedaggregate.go index db1ff700e9..d72eabe3b8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // ReverseNestedAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L540-L544 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1e173d6455..8f7c410889 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ReverseNestedAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L741-L747 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -70,8 +70,6 @@ func NewReverseNestedAggregation() *ReverseNestedAggregation { return r } -// true - type ReverseNestedAggregationVariant interface { ReverseNestedAggregationCaster() *ReverseNestedAggregation } diff --git a/typedapi/types/reversetokenfilter.go b/typedapi/types/reversetokenfilter.go index c8ece42225..00c69fd1f9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ReverseTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L306-L308 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L407-L409 type ReverseTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -86,8 +86,6 @@ func NewReverseTokenFilter() *ReverseTokenFilter { return r } -// true - type ReverseTokenFilterVariant interface { ReverseTokenFilterCaster() *ReverseTokenFilter } @@ -95,3 +93,8 @@ type ReverseTokenFilterVariant interface { func (s *ReverseTokenFilter) ReverseTokenFilterCaster() *ReverseTokenFilter { return s } + +func (s *ReverseTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/role.go b/typedapi/types/role.go index ac6a826ad1..9cc48cdcb1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // Role type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_role/types.ts#L32-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 741b30c8e8..c7bbfb1ddc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // RoleDescriptor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/RoleDescriptor.ts#L33-L83 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/RoleDescriptor.ts#L33-L83 type RoleDescriptor struct { // Applications A list of application privilege entries Applications []ApplicationPrivileges `json:"applications,omitempty"` @@ -171,8 +171,6 @@ func NewRoleDescriptor() *RoleDescriptor { return r } -// true - type RoleDescriptorVariant interface { RoleDescriptorCaster() *RoleDescriptor } diff --git a/typedapi/types/roledescriptorread.go b/typedapi/types/roledescriptorread.go index 5e908238a8..119144622f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // RoleDescriptorRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/RoleDescriptor.ts#L85-L133 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 407a032e6e..bd41ad0610 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // RoleDescriptorWrapper type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_service_accounts/types.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 54241a925f..86d08497d9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // RoleMappingRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/RoleMappingRule.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/RoleMappingRule.ts#L23-L31 type RoleMappingRule struct { AdditionalRoleMappingRuleProperty map[string]json.RawMessage `json:"-"` All []RoleMappingRule `json:"all,omitempty"` @@ -75,8 +75,6 @@ func NewRoleMappingRule() *RoleMappingRule { return r } -// true - type RoleMappingRuleVariant interface { RoleMappingRuleCaster() *RoleMappingRule } diff --git a/typedapi/types/rolequerycontainer.go b/typedapi/types/rolequerycontainer.go index 4597ca87d7..fc85f8161f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // RoleQueryContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_role/types.ts#L37-L101 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -221,8 +221,6 @@ func NewRoleQueryContainer() *RoleQueryContainer { return r } -// true - type RoleQueryContainerVariant interface { RoleQueryContainerCaster() *RoleQueryContainer } diff --git a/typedapi/types/roletemplate.go b/typedapi/types/roletemplate.go index 6c6b20652e..bcffe876c7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // RoleTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/RoleTemplate.ts#L28-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/RoleTemplate.ts#L28-L31 type RoleTemplate struct { Format *templateformat.TemplateFormat `json:"format,omitempty"` Template Script `json:"template"` @@ -39,8 +39,6 @@ func NewRoleTemplate() *RoleTemplate { return r } -// true - type RoleTemplateVariant interface { RoleTemplateCaster() *RoleTemplate } diff --git a/typedapi/types/roletemplateinlinequery.go b/typedapi/types/roletemplateinlinequery.go index b452178250..18db808937 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // Query // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L385-L386 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L385-L386 type RoleTemplateInlineQuery any type RoleTemplateInlineQueryVariant interface { diff --git a/typedapi/types/roletemplatequery.go b/typedapi/types/roletemplatequery.go index 04e2fa516e..59c0b386a7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // RoleTemplateQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L353-L363 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L353-L363 type RoleTemplateQuery struct { // Template When you create a role, you can specify a query that defines the document // level security permissions. You can optionally @@ -42,8 +42,6 @@ func NewRoleTemplateQuery() *RoleTemplateQuery { return r } -// true - type RoleTemplateQueryVariant interface { RoleTemplateQueryCaster() *RoleTemplateQuery } @@ -51,3 +49,8 @@ type RoleTemplateQueryVariant interface { func (s *RoleTemplateQuery) RoleTemplateQueryCaster() *RoleTemplateQuery { return s } + +func (s *RoleTemplateQuery) IndicesPrivilegesQueryCaster() *IndicesPrivilegesQuery { + o := IndicesPrivilegesQuery(s) + return &o +} diff --git a/typedapi/types/roletemplatescript.go b/typedapi/types/roletemplatescript.go index dc7d1e8c04..3895a626ac 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // RoleTemplateScript type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L365-L383 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L365-L383 type RoleTemplateScript struct { // Id The `id` for a stored script. Id *string `json:"id,omitempty"` @@ -142,8 +142,6 @@ func NewRoleTemplateScript() *RoleTemplateScript { return r } -// true - type RoleTemplateScriptVariant interface { RoleTemplateScriptCaster() *RoleTemplateScript } diff --git a/typedapi/types/rolloveraction.go b/typedapi/types/rolloveraction.go index 0fec93a269..ffcc610adc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RolloverAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L99-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L99-L110 type RolloverAction struct { MaxAge Duration `json:"max_age,omitempty"` MaxDocs *int64 `json:"max_docs,omitempty"` @@ -162,8 +162,6 @@ func NewRolloverAction() *RolloverAction { return r } -// true - type RolloverActionVariant interface { RolloverActionCaster() *RolloverAction } diff --git a/typedapi/types/rolloverconditions.go b/typedapi/types/rolloverconditions.go index 47bb3a2bee..ea81b8174c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RolloverConditions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/rollover/types.ts#L24-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/rollover/types.ts#L24-L40 type RolloverConditions struct { MaxAge Duration `json:"max_age,omitempty"` MaxAgeMillis *int64 `json:"max_age_millis,omitempty"` @@ -232,8 +232,6 @@ func NewRolloverConditions() *RolloverConditions { return r } -// true - type RolloverConditionsVariant interface { RolloverConditionsCaster() *RolloverConditions } diff --git a/typedapi/types/rollupcapabilities.go b/typedapi/types/rollupcapabilities.go index 7b3ab48ebf..b89e9a4eb6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // RollupCapabilities type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_rollup_caps/types.ts#L24-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c8fad16565..12ac3172c5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RollupCapabilitySummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_rollup_caps/types.ts#L31-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1a0f76f282..296a351632 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RollupFieldSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_rollup_caps/types.ts#L38-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4fdde70f7a..59021f5db7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // RollupJob type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_jobs/types.ts#L28-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 045a2e92bb..e3a6006668 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RollupJobConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_jobs/types.ts#L45-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f7cb8c9d1a..87a0fae3ee 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RollupJobStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_jobs/types.ts#L56-L69 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 37b32fc362..f75820a968 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // RollupJobStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_jobs/types.ts#L71-L75 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7157fd21f6..a77326a95d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RollupJobSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_rollup_index_caps/types.ts#L28-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1c41068141..c35c73597a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RollupJobSummaryField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/get_rollup_index_caps/types.ts#L35-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c6fc050156..e69c12778c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // RomanianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L268-L273 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L268-L273 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": @@ -119,8 +108,6 @@ func NewRomanianAnalyzer() *RomanianAnalyzer { return r } -// true - type RomanianAnalyzerVariant interface { RomanianAnalyzerCaster() *RomanianAnalyzer } @@ -128,3 +115,8 @@ type RomanianAnalyzerVariant interface { func (s *RomanianAnalyzer) RomanianAnalyzerCaster() *RomanianAnalyzer { return s } + +func (s *RomanianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/routingfield.go b/typedapi/types/routingfield.go index 19ac932dee..05bc1c082a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RoutingField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/meta-fields.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L50-L52 type RoutingField struct { Required bool `json:"required"` } @@ -77,8 +77,6 @@ func NewRoutingField() *RoutingField { return r } -// true - type RoutingFieldVariant interface { RoutingFieldCaster() *RoutingField } diff --git a/typedapi/types/rrfrank.go b/typedapi/types/rrfrank.go index 5e4be27606..8354fc19e6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RrfRank type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Rank.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -97,8 +97,6 @@ func NewRrfRank() *RrfRank { return r } -// true - type RrfRankVariant interface { RrfRankCaster() *RrfRank } diff --git a/typedapi/types/rrfretriever.go b/typedapi/types/rrfretriever.go index 5ce6a9f9e3..400ed65746 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,13 +31,17 @@ import ( // RRFRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Retriever.ts#L84-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -144,8 +177,6 @@ func NewRRFRetriever() *RRFRetriever { return r } -// true - type RRFRetrieverVariant interface { RRFRetrieverCaster() *RRFRetriever } diff --git a/typedapi/types/rulecondition.go b/typedapi/types/rulecondition.go index 012293a389..aba3894542 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // RuleCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Rule.ts#L52-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -100,8 +100,6 @@ func NewRuleCondition() *RuleCondition { return r } -// true - type RuleConditionVariant interface { RuleConditionCaster() *RuleCondition } diff --git a/typedapi/types/rulequery.go b/typedapi/types/rulequery.go index 4ef16bf67a..1e1e6995fe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RuleQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L398-L405 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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) + } } } @@ -115,8 +139,6 @@ func NewRuleQuery() *RuleQuery { return r } -// true - type RuleQueryVariant interface { RuleQueryCaster() *RuleQuery } diff --git a/typedapi/types/ruleretriever.go b/typedapi/types/ruleretriever.go index 57f9dacc27..ddea9c6df7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RuleRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Retriever.ts#L106-L115 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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) + } } } @@ -139,8 +164,6 @@ func NewRuleRetriever() *RuleRetriever { return r } -// true - type RuleRetrieverVariant interface { RuleRetrieverCaster() *RuleRetriever } diff --git a/typedapi/types/runningstatesearchinterval.go b/typedapi/types/runningstatesearchinterval.go index 3eb88360a2..9af54f8035 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // RunningStateSearchInterval type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Datafeed.ts#L226-L243 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9548730057..05399f8c06 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // RuntimeField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/RuntimeFields.ts#L26-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/RuntimeFields.ts#L26-L50 type RuntimeField struct { // FetchFields For type `lookup` FetchFields []RuntimeFieldFetchFields `json:"fetch_fields,omitempty"` @@ -133,8 +133,6 @@ func NewRuntimeField() *RuntimeField { return r } -// true - type RuntimeFieldVariant interface { RuntimeFieldCaster() *RuntimeField } diff --git a/typedapi/types/runtimefieldfetchfields.go b/typedapi/types/runtimefieldfetchfields.go index ecb12bc74c..e36598a172 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RuntimeFieldFetchFields type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/RuntimeFields.ts#L56-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/RuntimeFields.ts#L56-L60 type RuntimeFieldFetchFields struct { Field string `json:"field"` Format *string `json:"format,omitempty"` @@ -93,8 +93,6 @@ func NewRuntimeFieldFetchFields() *RuntimeFieldFetchFields { return r } -// true - type RuntimeFieldFetchFieldsVariant interface { RuntimeFieldFetchFieldsCaster() *RuntimeFieldFetchFields } diff --git a/typedapi/types/runtimefields.go b/typedapi/types/runtimefields.go index bed99880dd..f7b471bdc4 100644 --- a/typedapi/types/runtimefields.go +++ b/typedapi/types/runtimefields.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // RuntimeFields type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/RuntimeFields.ts#L24-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/RuntimeFields.ts#L24-L24 type RuntimeFields map[string]RuntimeField type RuntimeFieldsVariant interface { diff --git a/typedapi/types/runtimefieldstype.go b/typedapi/types/runtimefieldstype.go index 48e2371305..1c86011cb1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // RuntimeFieldsType type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L289-L304 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 96bbf282c8..a0f076cf3d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // RussianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L275-L280 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L275-L280 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": @@ -119,8 +108,6 @@ func NewRussianAnalyzer() *RussianAnalyzer { return r } -// true - type RussianAnalyzerVariant interface { RussianAnalyzerCaster() *RussianAnalyzer } @@ -128,3 +115,8 @@ type RussianAnalyzerVariant interface { func (s *RussianAnalyzer) RussianAnalyzerCaster() *RussianAnalyzer { return s } + +func (s *RussianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/russianstemtokenfilter.go b/typedapi/types/russianstemtokenfilter.go new file mode 100644 index 0000000000..c3dc05df7e --- /dev/null +++ b/typedapi/types/russianstemtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// RussianStemTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type RussianStemTokenFilterVariant interface { + RussianStemTokenFilterCaster() *RussianStemTokenFilter +} + +func (s *RussianStemTokenFilter) RussianStemTokenFilterCaster() *RussianStemTokenFilter { + return s +} + +func (s *RussianStemTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/s3repository.go b/typedapi/types/s3repository.go index 68e5222bd7..cccd36d41e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // S3Repository type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L64-L78 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L64-L78 type S3Repository struct { // Settings The repository settings. // @@ -102,8 +102,6 @@ func NewS3Repository() *S3Repository { return r } -// true - type S3RepositoryVariant interface { S3RepositoryCaster() *S3Repository } @@ -111,3 +109,8 @@ type S3RepositoryVariant interface { func (s *S3Repository) S3RepositoryCaster() *S3Repository { return s } + +func (s *S3Repository) RepositoryCaster() *Repository { + o := Repository(s) + return &o +} diff --git a/typedapi/types/s3repositorysettings.go b/typedapi/types/s3repositorysettings.go index 2de83527a4..287918bd5d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // S3RepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L237-L346 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L237-L346 type S3RepositorySettings struct { // BasePath The path to the repository data within its bucket. // It defaults to an empty string, meaning that the repository is at the root of @@ -381,8 +381,6 @@ func NewS3RepositorySettings() *S3RepositorySettings { return r } -// true - type S3RepositorySettingsVariant interface { S3RepositorySettingsCaster() *S3RepositorySettings } diff --git a/typedapi/types/samplediversity.go b/typedapi/types/samplediversity.go index 277e5318a5..7e2a9ab9cf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SampleDiversity type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/graph/_types/ExploreControls.ts#L51-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/graph/_types/ExploreControls.ts#L51-L54 type SampleDiversity struct { Field string `json:"field"` MaxDocsPerValue int `json:"max_docs_per_value"` @@ -85,8 +85,6 @@ func NewSampleDiversity() *SampleDiversity { return r } -// true - type SampleDiversityVariant interface { SampleDiversityCaster() *SampleDiversity } diff --git a/typedapi/types/sampleraggregate.go b/typedapi/types/sampleraggregate.go index 67c5e3a21e..7b704d6961 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // SamplerAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L558-L559 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ab10e86d6a..bab6683b36 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SamplerAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L771-L780 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -81,8 +81,6 @@ func NewSamplerAggregation() *SamplerAggregation { return r } -// true - type SamplerAggregationVariant interface { SamplerAggregationCaster() *SamplerAggregation } diff --git a/typedapi/types/scalarvalue.go b/typedapi/types/scalarvalue.go index f3e2eae6e9..43e7f5b564 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -28,7 +28,7 @@ package types // bool // nil // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L33-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L33-L37 type ScalarValue any type ScalarValueVariant interface { diff --git a/typedapi/types/scaledfloatnumberproperty.go b/typedapi/types/scaledfloatnumberproperty.go index 05d615299e..da88653fc8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // ScaledFloatNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L196-L200 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L197-L201 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 { @@ -991,8 +1003,6 @@ func NewScaledFloatNumberProperty() *ScaledFloatNumberProperty { return r } -// true - type ScaledFloatNumberPropertyVariant interface { ScaledFloatNumberPropertyCaster() *ScaledFloatNumberProperty } @@ -1000,3 +1010,8 @@ type ScaledFloatNumberPropertyVariant interface { func (s *ScaledFloatNumberProperty) ScaledFloatNumberPropertyCaster() *ScaledFloatNumberProperty { return s } + +func (s *ScaledFloatNumberProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/scandinavianfoldingtokenfilter.go b/typedapi/types/scandinavianfoldingtokenfilter.go new file mode 100644 index 0000000000..5e2766dc81 --- /dev/null +++ b/typedapi/types/scandinavianfoldingtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ScandinavianFoldingTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type ScandinavianFoldingTokenFilterVariant interface { + ScandinavianFoldingTokenFilterCaster() *ScandinavianFoldingTokenFilter +} + +func (s *ScandinavianFoldingTokenFilter) ScandinavianFoldingTokenFilterCaster() *ScandinavianFoldingTokenFilter { + return s +} + +func (s *ScandinavianFoldingTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/scandinaviannormalizationtokenfilter.go b/typedapi/types/scandinaviannormalizationtokenfilter.go new file mode 100644 index 0000000000..99677bf441 --- /dev/null +++ b/typedapi/types/scandinaviannormalizationtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// ScandinavianNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type ScandinavianNormalizationTokenFilterVariant interface { + ScandinavianNormalizationTokenFilterCaster() *ScandinavianNormalizationTokenFilter +} + +func (s *ScandinavianNormalizationTokenFilter) ScandinavianNormalizationTokenFilterCaster() *ScandinavianNormalizationTokenFilter { + return s +} + +func (s *ScandinavianNormalizationTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/schedulecontainer.go b/typedapi/types/schedulecontainer.go index 4d6171aca0..e0b9e5f56e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ScheduleContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Schedule.ts#L80-L92 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L80-L92 type ScheduleContainer struct { AdditionalScheduleContainerProperty map[string]json.RawMessage `json:"-"` Cron *string `json:"cron,omitempty"` @@ -195,8 +195,6 @@ func NewScheduleContainer() *ScheduleContainer { return r } -// true - type ScheduleContainerVariant interface { ScheduleContainerCaster() *ScheduleContainer } diff --git a/typedapi/types/scheduletimeofday.go b/typedapi/types/scheduletimeofday.go index c6e8c1b56c..481414f7bb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // HourAndMinute // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Schedule.ts#L99-L104 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L99-L104 type ScheduleTimeOfDay any type ScheduleTimeOfDayVariant interface { diff --git a/typedapi/types/scheduletriggerevent.go b/typedapi/types/scheduletriggerevent.go index 683a49f807..b9aea39f2e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ScheduleTriggerEvent type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Schedule.ts#L94-L97 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L94-L97 type ScheduleTriggerEvent struct { ScheduledTime DateTime `json:"scheduled_time"` TriggeredTime DateTime `json:"triggered_time,omitempty"` @@ -73,8 +73,6 @@ func NewScheduleTriggerEvent() *ScheduleTriggerEvent { return r } -// true - type ScheduleTriggerEventVariant interface { ScheduleTriggerEventCaster() *ScheduleTriggerEvent } diff --git a/typedapi/types/schedulingconfiguration.go b/typedapi/types/schedulingconfiguration.go index bd4306b9ba..f5b0541cb8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SchedulingConfiguration type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L246-L250 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L246-L250 type SchedulingConfiguration struct { AccessControl *ConnectorScheduling `json:"access_control,omitempty"` Full *ConnectorScheduling `json:"full,omitempty"` @@ -36,8 +36,6 @@ func NewSchedulingConfiguration() *SchedulingConfiguration { return r } -// true - type SchedulingConfigurationVariant interface { SchedulingConfigurationCaster() *SchedulingConfiguration } diff --git a/typedapi/types/scoresort.go b/typedapi/types/scoresort.go index d4c9b560e2..e3e0634ef8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // ScoreSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/sort.ts#L54-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L54-L56 type ScoreSort struct { Order *sortorder.SortOrder `json:"order,omitempty"` } @@ -38,8 +38,6 @@ func NewScoreSort() *ScoreSort { return r } -// true - type ScoreSortVariant interface { ScoreSortCaster() *ScoreSort } diff --git a/typedapi/types/script.go b/typedapi/types/script.go index 2e6c0e3f85..fc0bdd80b0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // Script type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Scripting.ts#L65-L89 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Scripting.ts#L65-L89 type Script struct { // Id The `id` for a stored script. Id *string `json:"id,omitempty"` @@ -143,8 +143,6 @@ func NewScript() *Script { return r } -// true - type ScriptVariant interface { ScriptCaster() *Script } diff --git a/typedapi/types/scriptcache.go b/typedapi/types/scriptcache.go index 44f9b0ab0e..3d1b13ec42 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ScriptCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L1102-L1116 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a19e00b630..d6e69f6ece 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ScriptCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Conditions.ts#L80-L88 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L80-L88 type ScriptCondition struct { Id *string `json:"id,omitempty"` Lang *scriptlanguage.ScriptLanguage `json:"lang,omitempty"` @@ -131,8 +131,6 @@ func NewScriptCondition() *ScriptCondition { return r } -// true - type ScriptConditionVariant interface { ScriptConditionCaster() *ScriptCondition } diff --git a/typedapi/types/scriptedheuristic.go b/typedapi/types/scriptedheuristic.go index 8f8546c8d5..80f9edd051 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ScriptedHeuristic type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L813-L815 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L813-L815 type ScriptedHeuristic struct { Script Script `json:"script"` } @@ -34,8 +34,6 @@ func NewScriptedHeuristic() *ScriptedHeuristic { return r } -// true - type ScriptedHeuristicVariant interface { ScriptedHeuristicCaster() *ScriptedHeuristic } diff --git a/typedapi/types/scriptedmetricaggregate.go b/typedapi/types/scriptedmetricaggregate.go index d742c7f5c9..a3d0c6aef2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ScriptedMetricAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L739-L745 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 819407491e..a0964795ef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ScriptedMetricAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L263-L289 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -131,8 +131,6 @@ func NewScriptedMetricAggregation() *ScriptedMetricAggregation { return r } -// true - type ScriptedMetricAggregationVariant interface { ScriptedMetricAggregationCaster() *ScriptedMetricAggregation } diff --git a/typedapi/types/scriptfield.go b/typedapi/types/scriptfield.go index 7a0d246e27..b34fb08ac4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ScriptField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Scripting.ts#L91-L94 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Scripting.ts#L91-L94 type ScriptField struct { IgnoreFailure *bool `json:"ignore_failure,omitempty"` Script Script `json:"script"` @@ -83,8 +83,6 @@ func NewScriptField() *ScriptField { return r } -// true - type ScriptFieldVariant interface { ScriptFieldCaster() *ScriptField } diff --git a/typedapi/types/scripting.go b/typedapi/types/scripting.go index f1deacffc6..72976804a5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Scripting type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L1048-L1066 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f8bd438ea4..b1b40e996b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ScriptProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1423-L1443 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1423-L1443 type ScriptProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -190,8 +190,6 @@ func NewScriptProcessor() *ScriptProcessor { return r } -// true - type ScriptProcessorVariant interface { ScriptProcessorCaster() *ScriptProcessor } diff --git a/typedapi/types/scriptquery.go b/typedapi/types/scriptquery.go index 432732f23d..89419dc124 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ScriptQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L337-L346 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -105,8 +105,6 @@ func NewScriptQuery() *ScriptQuery { return r } -// true - type ScriptQueryVariant interface { ScriptQueryCaster() *ScriptQuery } diff --git a/typedapi/types/scriptscorefunction.go b/typedapi/types/scriptscorefunction.go index 064915d131..889872f362 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ScriptScoreFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L137-L142 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/compound.ts#L137-L142 type ScriptScoreFunction struct { // Script A script that computes a score. Script Script `json:"script"` @@ -35,8 +35,6 @@ func NewScriptScoreFunction() *ScriptScoreFunction { return r } -// true - type ScriptScoreFunctionVariant interface { ScriptScoreFunctionCaster() *ScriptScoreFunction } diff --git a/typedapi/types/scriptscorequery.go b/typedapi/types/scriptscorequery.go index 5733fbb724..38b0481bfd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ScriptScoreQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L348-L365 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -132,8 +132,6 @@ func NewScriptScoreQuery() *ScriptScoreQuery { return r } -// true - type ScriptScoreQueryVariant interface { ScriptScoreQueryCaster() *ScriptScoreQuery } diff --git a/typedapi/types/scriptsort.go b/typedapi/types/scriptsort.go index dd4a9b8c9b..0bf459b213 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -28,7 +28,7 @@ import ( // ScriptSort type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/sort.ts#L72-L78 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L72-L78 type ScriptSort struct { Mode *sortmode.SortMode `json:"mode,omitempty"` Nested *NestedSortValue `json:"nested,omitempty"` @@ -44,8 +44,6 @@ func NewScriptSort() *ScriptSort { return r } -// true - type ScriptSortVariant interface { ScriptSortCaster() *ScriptSort } diff --git a/typedapi/types/scriptsource.go b/typedapi/types/scriptsource.go index a2c7841bbb..d154777dd7 100644 --- a/typedapi/types/scriptsource.go +++ b/typedapi/types/scriptsource.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // SearchRequestBody // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Scripting.ts#L48-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Scripting.ts#L48-L49 type ScriptSource any type ScriptSourceVariant interface { diff --git a/typedapi/types/scripttransform.go b/typedapi/types/scripttransform.go index 39036d7334..a05e70340f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ScriptTransform type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Transform.ts#L37-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Transform.ts#L37-L45 type ScriptTransform struct { Id *string `json:"id,omitempty"` Lang *string `json:"lang,omitempty"` @@ -136,8 +136,6 @@ func NewScriptTransform() *ScriptTransform { return r } -// true - type ScriptTransformVariant interface { ScriptTransformCaster() *ScriptTransform } diff --git a/typedapi/types/scrollids.go b/typedapi/types/scrollids.go index dcbb76fe20..4b22cdacda 100644 --- a/typedapi/types/scrollids.go +++ b/typedapi/types/scrollids.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ScrollIds type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L50-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L50-L50 type ScrollIds []string type ScrollIdsVariant interface { diff --git a/typedapi/types/searchablesnapshotaction.go b/typedapi/types/searchablesnapshotaction.go index 87b83ac0ef..59a745666a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SearchableSnapshotAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L128-L131 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L128-L131 type SearchableSnapshotAction struct { ForceMergeIndex *bool `json:"force_merge_index,omitempty"` SnapshotRepository string `json:"snapshot_repository"` @@ -90,8 +90,6 @@ func NewSearchableSnapshotAction() *SearchableSnapshotAction { return r } -// true - type SearchableSnapshotActionVariant interface { SearchableSnapshotActionCaster() *SearchableSnapshotAction } diff --git a/typedapi/types/searchablesnapshots.go b/typedapi/types/searchablesnapshots.go index 0368bc2171..cc72da090f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SearchableSnapshots type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L434-L438 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L434-L438 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 a55e9b59df..c71abbdcbc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SearchAccess type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L456-L476 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L456-L476 type SearchAccess struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited @@ -158,8 +158,6 @@ func NewSearchAccess() *SearchAccess { return r } -// true - type SearchAccessVariant interface { SearchAccessCaster() *SearchAccess } diff --git a/typedapi/types/searchapplication.go b/typedapi/types/searchapplication.go index cf27c457f6..da961eb435 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SearchApplication type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/_types/SearchApplication.ts#L24-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 420bfa0fd3..e87dfbf5c6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SearchApplicationParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/_types/SearchApplicationParameters.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -82,8 +82,6 @@ func NewSearchApplicationParameters() *SearchApplicationParameters { return r } -// true - type SearchApplicationParametersVariant interface { SearchApplicationParametersCaster() *SearchApplicationParameters } diff --git a/typedapi/types/searchapplicationtemplate.go b/typedapi/types/searchapplicationtemplate.go index 42912c9743..fc8e7aa08e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SearchApplicationTemplate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/search_application/_types/SearchApplicationTemplate.ts#L22-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/search_application/_types/SearchApplicationTemplate.ts#L22-L27 type SearchApplicationTemplate struct { // Script The associated mustache template. Script Script `json:"script"` @@ -35,8 +35,6 @@ func NewSearchApplicationTemplate() *SearchApplicationTemplate { return r } -// true - type SearchApplicationTemplateVariant interface { SearchApplicationTemplateCaster() *SearchApplicationTemplate } diff --git a/typedapi/types/searchasyoutypeproperty.go b/typedapi/types/searchasyoutypeproperty.go index 2fc085fa20..8021457ed1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // SearchAsYouTypeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L245-L256 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L263-L274 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 { @@ -952,8 +964,6 @@ func NewSearchAsYouTypeProperty() *SearchAsYouTypeProperty { return r } -// true - type SearchAsYouTypePropertyVariant interface { SearchAsYouTypePropertyCaster() *SearchAsYouTypeProperty } @@ -961,3 +971,8 @@ type SearchAsYouTypePropertyVariant interface { func (s *SearchAsYouTypeProperty) SearchAsYouTypePropertyCaster() *SearchAsYouTypeProperty { return s } + +func (s *SearchAsYouTypeProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/searchidle.go b/typedapi/types/searchidle.go index 3f0040d7cd..4bccb51384 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SearchIdle type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L253-L256 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L255-L258 type SearchIdle struct { After Duration `json:"after,omitempty"` } @@ -67,8 +67,6 @@ func NewSearchIdle() *SearchIdle { return r } -// true - type SearchIdleVariant interface { SearchIdleCaster() *SearchIdle } diff --git a/typedapi/types/searchinput.go b/typedapi/types/searchinput.go index faeb6ad507..b915fdc472 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SearchInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L112-L116 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L109-L113 type SearchInput struct { Extract []string `json:"extract,omitempty"` Request SearchInputRequestDefinition `json:"request"` @@ -79,8 +79,6 @@ func NewSearchInput() *SearchInput { return r } -// true - type SearchInputVariant interface { SearchInputCaster() *SearchInput } diff --git a/typedapi/types/searchinputrequestbody.go b/typedapi/types/searchinputrequestbody.go index 46ce207c62..3ecbaa7077 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SearchInputRequestBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L147-L149 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L144-L146 type SearchInputRequestBody struct { Query Query `json:"query"` } @@ -34,8 +34,6 @@ func NewSearchInputRequestBody() *SearchInputRequestBody { return r } -// true - type SearchInputRequestBodyVariant interface { SearchInputRequestBodyCaster() *SearchInputRequestBody } diff --git a/typedapi/types/searchinputrequestdefinition.go b/typedapi/types/searchinputrequestdefinition.go index d3f090da2f..50c7f674f4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // SearchInputRequestDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L118-L125 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L115-L122 type SearchInputRequestDefinition struct { Body *SearchInputRequestBody `json:"body,omitempty"` Indices []string `json:"indices,omitempty"` @@ -109,8 +109,6 @@ func NewSearchInputRequestDefinition() *SearchInputRequestDefinition { return r } -// true - type SearchInputRequestDefinitionVariant interface { SearchInputRequestDefinitionCaster() *SearchInputRequestDefinition } diff --git a/typedapi/types/searchprofile.go b/typedapi/types/searchprofile.go index 774b40cd64..73ec77a8af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SearchProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L136-L140 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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/searchrequestbody.go b/typedapi/types/searchrequestbody.go index 0b9aa5bc1b..ae3ca293bf 100644 --- a/typedapi/types/searchrequestbody.go +++ b/typedapi/types/searchrequestbody.go @@ -16,7 +16,7 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SearchRequestBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/SearchRequestBody.ts#L42-L242 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/SearchRequestBody.ts#L42-L242 type SearchRequestBody struct { // Aggregations Defines the aggregations that are run as part of the search request. Aggregations map[string]Aggregations `json:"aggregations,omitempty"` @@ -424,7 +424,7 @@ func (s *SearchRequestBody) 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 { @@ -544,8 +544,6 @@ func NewSearchRequestBody() *SearchRequestBody { return r } -// true - type SearchRequestBodyVariant interface { SearchRequestBodyCaster() *SearchRequestBody } @@ -553,3 +551,13 @@ type SearchRequestBodyVariant interface { func (s *SearchRequestBody) SearchRequestBodyCaster() *SearchRequestBody { return s } + +func (s *SearchRequestBody) MsearchRequestItemCaster() *MsearchRequestItem { + o := MsearchRequestItem(s) + return &o +} + +func (s *SearchRequestBody) ScriptSourceCaster() *ScriptSource { + o := ScriptSource(s) + return &o +} diff --git a/typedapi/types/searchshardsnodeattributes.go b/typedapi/types/searchshardsnodeattributes.go index 1c3dd0942d..612313ad4d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // SearchShardsNodeAttributes type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search_shards/SearchShardsResponse.ts#L42-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7faec89b44..37742f61bf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SearchStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L257-L276 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L279-L299 type SearchStats struct { FetchCurrent int64 `json:"fetch_current"` FetchTime Duration `json:"fetch_time,omitempty"` @@ -43,6 +43,7 @@ type SearchStats struct { QueryTime Duration `json:"query_time,omitempty"` QueryTimeInMillis int64 `json:"query_time_in_millis"` QueryTotal int64 `json:"query_total"` + RecentSearchLoad *Float64 `json:"recent_search_load,omitempty"` ScrollCurrent int64 `json:"scroll_current"` ScrollTime Duration `json:"scroll_time,omitempty"` ScrollTimeInMillis int64 `json:"scroll_time_in_millis"` @@ -171,6 +172,22 @@ func (s *SearchStats) UnmarshalJSON(data []byte) error { s.QueryTotal = f } + case "recent_search_load": + 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", "RecentSearchLoad", err) + } + f := Float64(value) + s.RecentSearchLoad = &f + case float64: + f := Float64(v) + s.RecentSearchLoad = &f + } + case "scroll_current": var tmp any dec.Decode(&tmp) @@ -264,5 +281,3 @@ func NewSearchStats() *SearchStats { return r } - -// false diff --git a/typedapi/types/searchtemplaterequestbody.go b/typedapi/types/searchtemplaterequestbody.go index ae02d25e45..032fb8ea1e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SearchTemplateRequestBody type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L128-L145 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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, @@ -127,8 +127,6 @@ func NewSearchTemplateRequestBody() *SearchTemplateRequestBody { return r } -// true - type SearchTemplateRequestBodyVariant interface { SearchTemplateRequestBodyCaster() *SearchTemplateRequestBody } diff --git a/typedapi/types/searchtransform.go b/typedapi/types/searchtransform.go index 5b7917186b..da3475a9a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SearchTransform type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Transform.ts#L47-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Transform.ts#L47-L50 type SearchTransform struct { Request SearchInputRequestDefinition `json:"request"` Timeout Duration `json:"timeout"` @@ -73,8 +73,6 @@ func NewSearchTransform() *SearchTransform { return r } -// true - type SearchTransformVariant interface { SearchTransformCaster() *SearchTransform } diff --git a/typedapi/types/searchusagestats.go b/typedapi/types/searchusagestats.go new file mode 100644 index 0000000000..797d0f045b --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SearchUsageStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 80e18eed18..4157c501d5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Security type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L440-L453 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L440-L453 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 124dcfb8d8..a3869190aa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SecurityRoleMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/RoleMapping.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a9c51ff539..16a7073e06 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SecurityRoles type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L306-L310 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 18f1a7a452..eb78519e1d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SecurityRolesDls type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L318-L320 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 47d3a75ae7..3e4a473ec8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SecurityRolesDlsBitSetCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L322-L326 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8219d1ca2e..bdd22e8361 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SecurityRolesFile type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L328-L332 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 684711b09d..f5d74c3d34 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SecurityRolesNative type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L312-L316 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 54578b6b6e..5045a8dd06 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SecuritySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/SecuritySettings.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/SecuritySettings.ts#L22-L24 type SecuritySettings struct { Index *IndexSettings `json:"index,omitempty"` } @@ -34,8 +34,6 @@ func NewSecuritySettings() *SecuritySettings { return r } -// true - type SecuritySettingsVariant interface { SecuritySettingsCaster() *SecuritySettings } diff --git a/typedapi/types/segment.go b/typedapi/types/segment.go index 77b7927ff6..5c1bf38b98 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Segment type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/segments/types.ts#L28-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 46f4c82084..4e761a5f6b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SegmentsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/segments/types.ts#L22-L107 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e31c576d26..0314ec2862 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SegmentsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L278-L371 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L301-L396 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 b316e5fd9c..2f9089ebf5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SelectOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L25-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L25-L28 type SelectOption struct { Label string `json:"label"` Value ScalarValue `json:"value"` @@ -81,8 +81,6 @@ func NewSelectOption() *SelectOption { return r } -// true - type SelectOptionVariant interface { SelectOptionCaster() *SelectOption } diff --git a/typedapi/types/semanticquery.go b/typedapi/types/semanticquery.go index b48de8b31c..bc62b6c6a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SemanticQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/SemanticQuery.ts#L22-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -125,8 +125,6 @@ func NewSemanticQuery() *SemanticQuery { return r } -// true - type SemanticQueryVariant interface { SemanticQueryCaster() *SemanticQuery } diff --git a/typedapi/types/semantictextproperty.go b/typedapi/types/semantictextproperty.go index 6faadec3eb..576c57120a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SemanticTextProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L220-L243 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L238-L261 type SemanticTextProperty struct { // ChunkingSettings Settings for chunking text into smaller passages. If specified, these will // override the @@ -127,8 +127,6 @@ func NewSemanticTextProperty() *SemanticTextProperty { return r } -// true - type SemanticTextPropertyVariant interface { SemanticTextPropertyCaster() *SemanticTextProperty } @@ -136,3 +134,8 @@ type SemanticTextPropertyVariant interface { func (s *SemanticTextProperty) SemanticTextPropertyCaster() *SemanticTextProperty { return s } + +func (s *SemanticTextProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/serbiananalyzer.go b/typedapi/types/serbiananalyzer.go index 3238729279..d9917c892d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // SerbianAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L282-L287 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L282-L287 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": @@ -119,8 +108,6 @@ func NewSerbianAnalyzer() *SerbianAnalyzer { return r } -// true - type SerbianAnalyzerVariant interface { SerbianAnalyzerCaster() *SerbianAnalyzer } @@ -128,3 +115,8 @@ type SerbianAnalyzerVariant interface { func (s *SerbianAnalyzer) SerbianAnalyzerCaster() *SerbianAnalyzer { return s } + +func (s *SerbianAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/serbiannormalizationtokenfilter.go b/typedapi/types/serbiannormalizationtokenfilter.go new file mode 100644 index 0000000000..72676c53dd --- /dev/null +++ b/typedapi/types/serbiannormalizationtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// SerbianNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type SerbianNormalizationTokenFilterVariant interface { + SerbianNormalizationTokenFilterCaster() *SerbianNormalizationTokenFilter +} + +func (s *SerbianNormalizationTokenFilter) SerbianNormalizationTokenFilterCaster() *SerbianNormalizationTokenFilter { + return s +} + +func (s *SerbianNormalizationTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/serialdifferencingaggregation.go b/typedapi/types/serialdifferencingaggregation.go index 3d30ef83ff..236017a6a8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // SerialDifferencingAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L399-L408 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -113,8 +113,6 @@ func NewSerialDifferencingAggregation() *SerialDifferencingAggregation { return r } -// true - type SerialDifferencingAggregationVariant interface { SerialDifferencingAggregationCaster() *SerialDifferencingAggregation } diff --git a/typedapi/types/serializedclusterstate.go b/typedapi/types/serializedclusterstate.go index 5a432dd81a..bc944d159e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SerializedClusterState type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L232-L238 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 93dae6ba8e..9fef258e8c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SerializedClusterStateDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L240-L246 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5781de4ecd..e803a7ede3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ServiceToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/create_service_token/types.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e667c49d8c..e5fac5e7bf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SetPriorityAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L95-L97 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L95-L97 type SetPriorityAction struct { Priority *int `json:"priority,omitempty"` } @@ -79,8 +79,6 @@ func NewSetPriorityAction() *SetPriorityAction { return r } -// true - type SetPriorityActionVariant interface { SetPriorityActionCaster() *SetPriorityAction } diff --git a/typedapi/types/setprocessor.go b/typedapi/types/setprocessor.go index 4af818d793..a90964019a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SetProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1445-L1479 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1445-L1479 type SetProcessor struct { // CopyFrom The origin field which will be copied to `field`, cannot set `value` // simultaneously. @@ -201,8 +201,6 @@ func NewSetProcessor() *SetProcessor { return r } -// true - type SetProcessorVariant interface { SetProcessorCaster() *SetProcessor } diff --git a/typedapi/types/setsecurityuserprocessor.go b/typedapi/types/setsecurityuserprocessor.go index deb9b1ffb4..77753e131b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SetSecurityUserProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1481-L1490 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1481-L1490 type SetSecurityUserProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -136,8 +136,6 @@ func NewSetSecurityUserProcessor() *SetSecurityUserProcessor { return r } -// true - type SetSecurityUserProcessorVariant interface { SetSecurityUserProcessorCaster() *SetSecurityUserProcessor } diff --git a/typedapi/types/settings.go b/typedapi/types/settings.go index 73ef83f88e..2fc9ffb3a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Settings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/_types/Transform.ts#L98-L144 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -183,8 +183,6 @@ func NewSettings() *Settings { return r } -// true - type SettingsVariant interface { SettingsCaster() *Settings } diff --git a/typedapi/types/settingsanalyze.go b/typedapi/types/settingsanalyze.go index 77c76d8186..528a245ba7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SettingsAnalyze type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L243-L246 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L245-L248 type SettingsAnalyze struct { MaxTokenCount Stringifiedinteger `json:"max_token_count,omitempty"` } @@ -67,8 +67,6 @@ func NewSettingsAnalyze() *SettingsAnalyze { return r } -// true - type SettingsAnalyzeVariant interface { SettingsAnalyzeCaster() *SettingsAnalyze } diff --git a/typedapi/types/settingshighlight.go b/typedapi/types/settingshighlight.go index 54a6531d50..b2dcaa0f8b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SettingsHighlight type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L238-L241 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L240-L243 type SettingsHighlight struct { MaxAnalyzedOffset *int `json:"max_analyzed_offset,omitempty"` } @@ -79,8 +79,6 @@ func NewSettingsHighlight() *SettingsHighlight { return r } -// true - type SettingsHighlightVariant interface { SettingsHighlightCaster() *SettingsHighlight } diff --git a/typedapi/types/settingsquerystring.go b/typedapi/types/settingsquerystring.go index 3fd421d24f..58a9ab8a12 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SettingsQueryString type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L258-L260 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L260-L262 type SettingsQueryString struct { Lenient Stringifiedboolean `json:"lenient"` } @@ -67,8 +67,6 @@ func NewSettingsQueryString() *SettingsQueryString { return r } -// true - type SettingsQueryStringVariant interface { SettingsQueryStringCaster() *SettingsQueryString } diff --git a/typedapi/types/settingssearch.go b/typedapi/types/settingssearch.go index 2c6cc8ef3b..e214808558 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SettingsSearch type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L248-L251 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L250-L253 type SettingsSearch struct { Idle *SearchIdle `json:"idle,omitempty"` Slowlog *SlowlogSettings `json:"slowlog,omitempty"` @@ -35,8 +35,6 @@ func NewSettingsSearch() *SettingsSearch { return r } -// true - type SettingsSearchVariant interface { SettingsSearchCaster() *SettingsSearch } diff --git a/typedapi/types/settingssimilarity.go b/typedapi/types/settingssimilarity.go index c18e3f1c61..efbc205a3c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ package types // SettingsSimilarityLmj // SettingsSimilarityScripted // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L178-L190 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L180-L192 type SettingsSimilarity any type SettingsSimilarityVariant interface { diff --git a/typedapi/types/settingssimilaritybm25.go b/typedapi/types/settingssimilaritybm25.go index a6f1b6b7bf..174479ee09 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SettingsSimilarityBm25 type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L196-L201 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L198-L203 type SettingsSimilarityBm25 struct { B *Float64 `json:"b,omitempty"` DiscountOverlaps *bool `json:"discount_overlaps,omitempty"` @@ -132,8 +132,6 @@ func NewSettingsSimilarityBm25() *SettingsSimilarityBm25 { return r } -// true - type SettingsSimilarityBm25Variant interface { SettingsSimilarityBm25Caster() *SettingsSimilarityBm25 } @@ -141,3 +139,8 @@ type SettingsSimilarityBm25Variant interface { func (s *SettingsSimilarityBm25) SettingsSimilarityBm25Caster() *SettingsSimilarityBm25 { return s } + +func (s *SettingsSimilarityBm25) SettingsSimilarityCaster() *SettingsSimilarity { + o := SettingsSimilarity(s) + return &o +} diff --git a/typedapi/types/settingssimilarityboolean.go b/typedapi/types/settingssimilarityboolean.go index a4b471893f..9beb173c7a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // SettingsSimilarityBoolean type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L192-L194 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L194-L196 type SettingsSimilarityBoolean struct { Type string `json:"type,omitempty"` } @@ -50,8 +50,6 @@ func NewSettingsSimilarityBoolean() *SettingsSimilarityBoolean { return r } -// true - type SettingsSimilarityBooleanVariant interface { SettingsSimilarityBooleanCaster() *SettingsSimilarityBoolean } @@ -59,3 +57,8 @@ type SettingsSimilarityBooleanVariant interface { func (s *SettingsSimilarityBoolean) SettingsSimilarityBooleanCaster() *SettingsSimilarityBoolean { return s } + +func (s *SettingsSimilarityBoolean) SettingsSimilarityCaster() *SettingsSimilarity { + o := SettingsSimilarity(s) + return &o +} diff --git a/typedapi/types/settingssimilaritydfi.go b/typedapi/types/settingssimilaritydfi.go index 07f8701cce..ff4967f00e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -28,7 +28,7 @@ import ( // SettingsSimilarityDfi type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L203-L206 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L205-L208 type SettingsSimilarityDfi struct { IndependenceMeasure dfiindependencemeasure.DFIIndependenceMeasure `json:"independence_measure"` Type string `json:"type,omitempty"` @@ -54,8 +54,6 @@ func NewSettingsSimilarityDfi() *SettingsSimilarityDfi { return r } -// true - type SettingsSimilarityDfiVariant interface { SettingsSimilarityDfiCaster() *SettingsSimilarityDfi } @@ -63,3 +61,8 @@ type SettingsSimilarityDfiVariant interface { func (s *SettingsSimilarityDfi) SettingsSimilarityDfiCaster() *SettingsSimilarityDfi { return s } + +func (s *SettingsSimilarityDfi) SettingsSimilarityCaster() *SettingsSimilarity { + o := SettingsSimilarity(s) + return &o +} diff --git a/typedapi/types/settingssimilaritydfr.go b/typedapi/types/settingssimilaritydfr.go index 051dfb5a61..b1f581003c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SettingsSimilarityDfr type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L208-L213 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L210-L215 type SettingsSimilarityDfr struct { AfterEffect dfraftereffect.DFRAfterEffect `json:"after_effect"` BasicModel dfrbasicmodel.DFRBasicModel `json:"basic_model"` @@ -60,8 +60,6 @@ func NewSettingsSimilarityDfr() *SettingsSimilarityDfr { return r } -// true - type SettingsSimilarityDfrVariant interface { SettingsSimilarityDfrCaster() *SettingsSimilarityDfr } @@ -69,3 +67,8 @@ type SettingsSimilarityDfrVariant interface { func (s *SettingsSimilarityDfr) SettingsSimilarityDfrCaster() *SettingsSimilarityDfr { return s } + +func (s *SettingsSimilarityDfr) SettingsSimilarityCaster() *SettingsSimilarity { + o := SettingsSimilarity(s) + return &o +} diff --git a/typedapi/types/settingssimilarityib.go b/typedapi/types/settingssimilarityib.go index 4e02f7bdbd..6c28d67e3b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SettingsSimilarityIb type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L215-L220 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L217-L222 type SettingsSimilarityIb struct { Distribution ibdistribution.IBDistribution `json:"distribution"` Lambda iblambda.IBLambda `json:"lambda"` @@ -60,8 +60,6 @@ func NewSettingsSimilarityIb() *SettingsSimilarityIb { return r } -// true - type SettingsSimilarityIbVariant interface { SettingsSimilarityIbCaster() *SettingsSimilarityIb } @@ -69,3 +67,8 @@ type SettingsSimilarityIbVariant interface { func (s *SettingsSimilarityIb) SettingsSimilarityIbCaster() *SettingsSimilarityIb { return s } + +func (s *SettingsSimilarityIb) SettingsSimilarityCaster() *SettingsSimilarity { + o := SettingsSimilarity(s) + return &o +} diff --git a/typedapi/types/settingssimilaritylmd.go b/typedapi/types/settingssimilaritylmd.go index f143255b9d..62fd8102bf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SettingsSimilarityLmd type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L222-L225 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L224-L227 type SettingsSimilarityLmd struct { Mu *Float64 `json:"mu,omitempty"` Type string `json:"type,omitempty"` @@ -98,8 +98,6 @@ func NewSettingsSimilarityLmd() *SettingsSimilarityLmd { return r } -// true - type SettingsSimilarityLmdVariant interface { SettingsSimilarityLmdCaster() *SettingsSimilarityLmd } @@ -107,3 +105,8 @@ type SettingsSimilarityLmdVariant interface { func (s *SettingsSimilarityLmd) SettingsSimilarityLmdCaster() *SettingsSimilarityLmd { return s } + +func (s *SettingsSimilarityLmd) SettingsSimilarityCaster() *SettingsSimilarity { + o := SettingsSimilarity(s) + return &o +} diff --git a/typedapi/types/settingssimilaritylmj.go b/typedapi/types/settingssimilaritylmj.go index 62935c727d..bd39bffded 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SettingsSimilarityLmj type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L227-L230 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L229-L232 type SettingsSimilarityLmj struct { Lambda *Float64 `json:"lambda,omitempty"` Type string `json:"type,omitempty"` @@ -98,8 +98,6 @@ func NewSettingsSimilarityLmj() *SettingsSimilarityLmj { return r } -// true - type SettingsSimilarityLmjVariant interface { SettingsSimilarityLmjCaster() *SettingsSimilarityLmj } @@ -107,3 +105,8 @@ type SettingsSimilarityLmjVariant interface { func (s *SettingsSimilarityLmj) SettingsSimilarityLmjCaster() *SettingsSimilarityLmj { return s } + +func (s *SettingsSimilarityLmj) SettingsSimilarityCaster() *SettingsSimilarity { + o := SettingsSimilarity(s) + return &o +} diff --git a/typedapi/types/settingssimilarityscripted.go b/typedapi/types/settingssimilarityscripted.go index 5e07b8a36c..fd08407909 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // SettingsSimilarityScripted type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L232-L236 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L234-L238 type SettingsSimilarityScripted struct { Script Script `json:"script"` Type string `json:"type,omitempty"` @@ -54,8 +54,6 @@ func NewSettingsSimilarityScripted() *SettingsSimilarityScripted { return r } -// true - type SettingsSimilarityScriptedVariant interface { SettingsSimilarityScriptedCaster() *SettingsSimilarityScripted } @@ -63,3 +61,8 @@ type SettingsSimilarityScriptedVariant interface { func (s *SettingsSimilarityScripted) SettingsSimilarityScriptedCaster() *SettingsSimilarityScripted { return s } + +func (s *SettingsSimilarityScripted) SettingsSimilarityCaster() *SettingsSimilarity { + o := SettingsSimilarity(s) + return &o +} diff --git a/typedapi/types/shapefieldquery.go b/typedapi/types/shapefieldquery.go index 1d26de2b2b..ba67693d0c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // ShapeFieldQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L383-L396 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/specialized.ts#L383-L396 type ShapeFieldQuery struct { // IndexedShape Queries using a pre-indexed shape. IndexedShape *FieldLookup `json:"indexed_shape,omitempty"` @@ -85,8 +85,6 @@ func NewShapeFieldQuery() *ShapeFieldQuery { return r } -// true - type ShapeFieldQueryVariant interface { ShapeFieldQueryCaster() *ShapeFieldQuery } diff --git a/typedapi/types/shapeproperty.go b/typedapi/types/shapeproperty.go index 43bf8120af..cd132c59d4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // ShapeProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/geo.ts#L74-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -902,8 +914,6 @@ func NewShapeProperty() *ShapeProperty { return r } -// true - type ShapePropertyVariant interface { ShapePropertyCaster() *ShapeProperty } @@ -911,3 +921,8 @@ type ShapePropertyVariant interface { func (s *ShapeProperty) ShapePropertyCaster() *ShapeProperty { return s } + +func (s *ShapeProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/shapequery.go b/typedapi/types/shapequery.go index 72a1fcbb67..efe2415e2a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShapeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L367-L381 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -159,8 +159,6 @@ func NewShapeQuery() *ShapeQuery { return r } -// true - type ShapeQueryVariant interface { ShapeQueryCaster() *ShapeQuery } diff --git a/typedapi/types/shardcommit.go b/typedapi/types/shardcommit.go index 9477c7fd20..3bfe944043 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardCommit type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L112-L117 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 742ccb977e..04800a50f5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Errors.ts#L52-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a352d55a45..42dd48a21c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardFileSizeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L124-L131 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7242861bd2..e709d0f7c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ShardHealthStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/health/types.ts#L37-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f4b8249e3e..55d093705d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardLease type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L133-L138 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fff21a2c31..496ec123da 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // ShardMigrationStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/shutdown/get_node/ShutdownGetNodeResponse.ts#L52-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 312e6cc451..9ca91e0d0b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardPath type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L140-L144 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 be5ba07a8a..bf08cf0a7e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/profile.ts#L142-L152 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b37715edc3..4ebecc79f6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardQueryCache type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L146-L154 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2aa9b09511..92cef7c474 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardRecovery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/recovery/types.ts#L118-L135 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 43cdcec4ac..d4eb2d5cef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardRetentionLeases type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L156-L160 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e7a04ba9f8..c90a378d7d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ShardRouting type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L162-L167 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4a7f6de0b6..47e5d638b4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ShardsAvailabilityIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L106-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L107-L111 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 eecb8f2d69..81619d3f66 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardsAvailabilityIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L111-L122 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L112-L123 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 d0a25991de..23d4d3812a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // ShardsCapacityIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L191-L195 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L192-L196 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 63ed27eb80..c1217f8e94 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ShardsCapacityIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L197-L200 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L198-L201 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 05fffb8e27..b1fec9a3f0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardsCapacityIndicatorTierDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L202-L205 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L203-L206 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 9bc56d2976..1629b19b78 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardSegmentRouting type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/segments/types.ts#L40-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a9726ba798..2759afabd7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardSequenceNumber type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L176-L180 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8828c7ffa8..def5388016 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/shards/types.ts#L20-L427 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c0e1825254..a3aca47bad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardsSegment type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/segments/types.ts#L46-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 19becb5893..cf3f408494 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ShardsStatsSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotShardsStatus.ts#L29-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cfceb14501..e51c049c41 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardsStatsSummaryItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotShardsStatus.ts#L37-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ed4468845b..e5de7bb349 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ShardStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L54-L69 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9b7309cff3..0498f9538d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // ShardStore type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/shard_stores/types.ts#L29-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5cf7aa9e8b..d9dbc4a795 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardStoreException type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/shard_stores/types.ts#L53-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bdbbd5e369..e8e7d3d819 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ShardStoreIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search_shards/SearchShardsResponse.ts#L62-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 89428615d7..83a7cd0b39 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardStoreNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/shard_stores/types.ts#L38-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f5f31d252d..e2a7a21ff4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // ShardStoreWrapper type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/shard_stores/types.ts#L58-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3cb6ed4f6f..00c89cc6f5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShardsTotalStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/stats/types.ts#L182-L184 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f7cc77c34d..8b034ae0db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Shared type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/searchable_snapshots/cache_stats/Response.ts#L34-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e3f405e727..cf804ecb07 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SharedFileSystemRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L80-L90 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L80-L90 type SharedFileSystemRepository struct { // Settings The repository settings. Settings SharedFileSystemRepositorySettings `json:"settings"` @@ -95,8 +95,6 @@ func NewSharedFileSystemRepository() *SharedFileSystemRepository { return r } -// true - type SharedFileSystemRepositoryVariant interface { SharedFileSystemRepositoryCaster() *SharedFileSystemRepository } @@ -104,3 +102,8 @@ type SharedFileSystemRepositoryVariant interface { func (s *SharedFileSystemRepository) SharedFileSystemRepositoryCaster() *SharedFileSystemRepository { return s } + +func (s *SharedFileSystemRepository) RepositoryCaster() *Repository { + o := Repository(s) + return &o +} diff --git a/typedapi/types/sharedfilesystemrepositorysettings.go b/typedapi/types/sharedfilesystemrepositorysettings.go index 0bd7bd19b0..4af3b7b7a7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SharedFileSystemRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L348-L375 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L348-L375 type SharedFileSystemRepositorySettings struct { // ChunkSize Big files can be broken down into multiple smaller blobs in the blob store // during snapshotting. @@ -182,8 +182,6 @@ func NewSharedFileSystemRepositorySettings() *SharedFileSystemRepositorySettings return r } -// true - type SharedFileSystemRepositorySettingsVariant interface { SharedFileSystemRepositorySettingsCaster() *SharedFileSystemRepositorySettings } diff --git a/typedapi/types/shingletokenfilter.go b/typedapi/types/shingletokenfilter.go index 75b9d20bcd..3abc665cc7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,16 +31,31 @@ import ( // ShingleTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L86-L94 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -175,8 +176,6 @@ func NewShingleTokenFilter() *ShingleTokenFilter { return r } -// true - type ShingleTokenFilterVariant interface { ShingleTokenFilterCaster() *ShingleTokenFilter } @@ -184,3 +183,8 @@ type ShingleTokenFilterVariant interface { func (s *ShingleTokenFilter) ShingleTokenFilterCaster() *ShingleTokenFilter { return s } + +func (s *ShingleTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/shortnumberproperty.go b/typedapi/types/shortnumberproperty.go index aef2c83969..9300b08c54 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // ShortNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L181-L184 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L182-L185 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 { @@ -962,8 +974,6 @@ func NewShortNumberProperty() *ShortNumberProperty { return r } -// true - type ShortNumberPropertyVariant interface { ShortNumberPropertyCaster() *ShortNumberProperty } @@ -971,3 +981,8 @@ type ShortNumberPropertyVariant interface { func (s *ShortNumberProperty) ShortNumberPropertyCaster() *ShortNumberProperty { return s } + +func (s *ShortNumberProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/shrinkaction.go b/typedapi/types/shrinkaction.go index 261d9c1758..b668e80db7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ShrinkAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L117-L121 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -100,8 +100,6 @@ func NewShrinkAction() *ShrinkAction { return r } -// true - type ShrinkActionVariant interface { ShrinkActionCaster() *ShrinkAction } diff --git a/typedapi/types/significantlongtermsaggregate.go b/typedapi/types/significantlongtermsaggregate.go index a1cad64586..b7de1047b1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SignificantLongTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L668-L670 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 051ca77021..16448df199 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // SignificantLongTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L677-L680 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f6f4dfd46d..daa5162a3d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SignificantStringTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L682-L684 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 19bbccc52d..e5248c91af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // SignificantStringTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L686-L688 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 251ea34fd8..a045da1d26 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // SignificantTermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L817-L884 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -264,8 +264,6 @@ func NewSignificantTermsAggregation() *SignificantTermsAggregation { return r } -// true - type SignificantTermsAggregationVariant interface { SignificantTermsAggregationCaster() *SignificantTermsAggregation } diff --git a/typedapi/types/significanttextaggregation.go b/typedapi/types/significanttextaggregation.go index 5147ded805..a849d4f865 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // SignificantTextAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L886-L961 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -298,8 +298,6 @@ func NewSignificantTextAggregation() *SignificantTextAggregation { return r } -// true - type SignificantTextAggregationVariant interface { SignificantTextAggregationCaster() *SignificantTextAggregation } diff --git a/typedapi/types/simpleanalyzer.go b/typedapi/types/simpleanalyzer.go index 91dd8d1622..5d85365421 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SimpleAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L367-L371 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L367-L371 type SimpleAnalyzer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -86,8 +86,6 @@ func NewSimpleAnalyzer() *SimpleAnalyzer { return r } -// true - type SimpleAnalyzerVariant interface { SimpleAnalyzerCaster() *SimpleAnalyzer } @@ -95,3 +93,8 @@ type SimpleAnalyzerVariant interface { func (s *SimpleAnalyzer) SimpleAnalyzerCaster() *SimpleAnalyzer { return s } + +func (s *SimpleAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/simplemovingaverageaggregation.go b/typedapi/types/simplemovingaverageaggregation.go index f22ba7da3a..59aaaa2bdc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // SimpleMovingAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L273-L276 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -174,8 +174,6 @@ func NewSimpleMovingAverageAggregation() *SimpleMovingAverageAggregation { return r } -// true - type SimpleMovingAverageAggregationVariant interface { SimpleMovingAverageAggregationCaster() *SimpleMovingAverageAggregation } @@ -183,3 +181,8 @@ type SimpleMovingAverageAggregationVariant interface { func (s *SimpleMovingAverageAggregation) SimpleMovingAverageAggregationCaster() *SimpleMovingAverageAggregation { return s } + +func (s *SimpleMovingAverageAggregation) MovingAverageAggregationCaster() *MovingAverageAggregation { + o := MovingAverageAggregation(s) + return &o +} diff --git a/typedapi/types/simplepatternsplittokenizer.go b/typedapi/types/simplepatternsplittokenizer.go index ad0da8eeb4..1b78d68133 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SimplePatternSplitTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L116-L119 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L118-L121 type SimplePatternSplitTokenizer struct { Pattern *string `json:"pattern,omitempty"` Type string `json:"type,omitempty"` @@ -101,8 +101,6 @@ func NewSimplePatternSplitTokenizer() *SimplePatternSplitTokenizer { return r } -// true - type SimplePatternSplitTokenizerVariant interface { SimplePatternSplitTokenizerCaster() *SimplePatternSplitTokenizer } @@ -110,3 +108,8 @@ type SimplePatternSplitTokenizerVariant interface { func (s *SimplePatternSplitTokenizer) SimplePatternSplitTokenizerCaster() *SimplePatternSplitTokenizer { return s } + +func (s *SimplePatternSplitTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/simplepatterntokenizer.go b/typedapi/types/simplepatterntokenizer.go index 65011403c4..7b6b83df8a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SimplePatternTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L111-L114 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L113-L116 type SimplePatternTokenizer struct { Pattern *string `json:"pattern,omitempty"` Type string `json:"type,omitempty"` @@ -101,8 +101,6 @@ func NewSimplePatternTokenizer() *SimplePatternTokenizer { return r } -// true - type SimplePatternTokenizerVariant interface { SimplePatternTokenizerCaster() *SimplePatternTokenizer } @@ -110,3 +108,8 @@ type SimplePatternTokenizerVariant interface { func (s *SimplePatternTokenizer) SimplePatternTokenizerCaster() *SimplePatternTokenizer { return s } + +func (s *SimplePatternTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/simplequerystringflags.go b/typedapi/types/simplequerystringflags.go index 05a6265905..795cfcd8a6 100644 --- a/typedapi/types/simplequerystringflags.go +++ b/typedapi/types/simplequerystringflags.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SimpleQueryStringFlags type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L723-L727 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/fulltext.ts#L774-L778 type SimpleQueryStringFlags PipeSeparatedFlagsSimpleQueryStringFlag type SimpleQueryStringFlagsVariant interface { diff --git a/typedapi/types/simplequerystringquery.go b/typedapi/types/simplequerystringquery.go index 83d833cbb1..3de603156d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // SimpleQueryStringQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/fulltext.ts#L786-L854 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -279,8 +279,6 @@ func NewSimpleQueryStringQuery() *SimpleQueryStringQuery { return r } -// true - type SimpleQueryStringQueryVariant interface { SimpleQueryStringQueryCaster() *SimpleQueryStringQuery } diff --git a/typedapi/types/simplevalueaggregate.go b/typedapi/types/simplevalueaggregate.go index 183bec01ed..b399fd57c6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SimpleValueAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L238-L239 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 630718c315..cad6d0f9be 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SimulatedActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Action.ts#L90-L94 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L90-L94 type SimulatedActions struct { Actions []string `json:"actions"` All *SimulatedActions `json:"all,omitempty"` @@ -89,8 +89,6 @@ func NewSimulatedActions() *SimulatedActions { return r } -// true - type SimulatedActionsVariant interface { SimulatedActionsCaster() *SimulatedActions } diff --git a/typedapi/types/simulatedocumentresult.go b/typedapi/types/simulatedocumentresult.go index 4e09568fe0..7a6de1046f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SimulateDocumentResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Simulation.ts#L46-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b7004b5d8c..8b36fe3ad7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SimulateIngestDocumentResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/simulate/ingest/SimulateIngestResponse.ts#L31-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d1088afed9..7e4adc2f3c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SizeField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/meta-fields.ts#L54-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L54-L56 type SizeField struct { Enabled bool `json:"enabled"` } @@ -77,8 +77,6 @@ func NewSizeField() *SizeField { return r } -// true - type SizeFieldVariant interface { SizeFieldCaster() *SizeField } diff --git a/typedapi/types/sizehttphistogram.go b/typedapi/types/sizehttphistogram.go index 3230e6f786..be0d2f1cfc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SizeHttpHistogram type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L714-L718 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b53f567b32..99cb52d295 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SlackAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L91-L94 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L91-L94 type SlackAction struct { Account *string `json:"account,omitempty"` Message SlackMessage `json:"message"` @@ -81,8 +81,6 @@ func NewSlackAction() *SlackAction { return r } -// true - type SlackActionVariant interface { SlackActionCaster() *SlackAction } diff --git a/typedapi/types/slackattachment.go b/typedapi/types/slackattachment.go index 3a99a2c9cb..4c32eca718 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SlackAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L101-L117 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L101-L117 type SlackAttachment struct { AuthorIcon *string `json:"author_icon,omitempty"` AuthorLink *string `json:"author_link,omitempty"` @@ -243,8 +243,6 @@ func NewSlackAttachment() *SlackAttachment { return r } -// true - type SlackAttachmentVariant interface { SlackAttachmentCaster() *SlackAttachment } diff --git a/typedapi/types/slackattachmentfield.go b/typedapi/types/slackattachmentfield.go index 73a661d191..7d3875c39a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SlackAttachmentField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L119-L123 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L119-L123 type SlackAttachmentField struct { Int bool `json:"short"` Title string `json:"title"` @@ -103,8 +103,6 @@ func NewSlackAttachmentField() *SlackAttachmentField { return r } -// true - type SlackAttachmentFieldVariant interface { SlackAttachmentFieldCaster() *SlackAttachmentField } diff --git a/typedapi/types/slackdynamicattachment.go b/typedapi/types/slackdynamicattachment.go index 70a02c7141..567a3c9976 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SlackDynamicAttachment type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L125-L128 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L125-L128 type SlackDynamicAttachment struct { AttachmentTemplate SlackAttachment `json:"attachment_template"` ListPath string `json:"list_path"` @@ -81,8 +81,6 @@ func NewSlackDynamicAttachment() *SlackDynamicAttachment { return r } -// true - type SlackDynamicAttachmentVariant interface { SlackDynamicAttachmentCaster() *SlackDynamicAttachment } diff --git a/typedapi/types/slackmessage.go b/typedapi/types/slackmessage.go index 173b3f784d..0ba15772cd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SlackMessage type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L130-L137 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L130-L137 type SlackMessage struct { Attachments []SlackAttachment `json:"attachments"` DynamicAttachments *SlackDynamicAttachment `json:"dynamic_attachments,omitempty"` @@ -119,8 +119,6 @@ func NewSlackMessage() *SlackMessage { return r } -// true - type SlackMessageVariant interface { SlackMessageCaster() *SlackMessage } diff --git a/typedapi/types/slackresult.go b/typedapi/types/slackresult.go index 76ede90f8c..43232c0d0e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SlackResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L96-L99 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f6a40275ae..2a41336411 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SlicedScroll type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/SlicedScroll.ts#L23-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/SlicedScroll.ts#L23-L27 type SlicedScroll struct { Field *string `json:"field,omitempty"` Id string `json:"id"` @@ -91,8 +91,6 @@ func NewSlicedScroll() *SlicedScroll { return r } -// true - type SlicedScrollVariant interface { SlicedScrollCaster() *SlicedScroll } diff --git a/typedapi/types/slices.go b/typedapi/types/slices.go index ef497f8820..0767a015f8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // int // slicescalculation.SlicesCalculation // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L361-L366 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L363-L368 type Slices any diff --git a/typedapi/types/slm.go b/typedapi/types/slm.go index f077abf863..69083e04fd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Slm type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L455-L458 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L455-L458 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 1d65cb285b..e461d62516 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // SlmIndicator type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L175-L179 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L176-L180 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 19a5aeaa3f..84a7c1f885 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // SlmIndicatorDetails type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L180-L184 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L181-L185 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 2094b6cfbe..cdee24b23c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SlmIndicatorUnhealthyPolicies type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L186-L189 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L187-L190 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 e8c8a9dfee..fd6d78d3e7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SLMPolicy type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/_types/SnapshotLifecycle.ts#L86-L92 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2b7bfe3d7c..74be5db12e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SlowlogSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L515-L520 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L528-L533 type SlowlogSettings struct { Level *string `json:"level,omitempty"` Reformat *bool `json:"reformat,omitempty"` @@ -113,8 +113,6 @@ func NewSlowlogSettings() *SlowlogSettings { return r } -// true - type SlowlogSettingsVariant interface { SlowlogSettingsCaster() *SlowlogSettings } diff --git a/typedapi/types/slowlogtresholdlevels.go b/typedapi/types/slowlogtresholdlevels.go index 6f855e49ae..70179a4b96 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SlowlogTresholdLevels type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L527-L532 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L540-L545 type SlowlogTresholdLevels struct { Debug Duration `json:"debug,omitempty"` Info Duration `json:"info,omitempty"` @@ -85,8 +85,6 @@ func NewSlowlogTresholdLevels() *SlowlogTresholdLevels { return r } -// true - type SlowlogTresholdLevelsVariant interface { SlowlogTresholdLevelsCaster() *SlowlogTresholdLevels } diff --git a/typedapi/types/slowlogtresholds.go b/typedapi/types/slowlogtresholds.go index 9d83621003..22d6a5ab2f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SlowlogTresholds type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L522-L525 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L535-L538 type SlowlogTresholds struct { Fetch *SlowlogTresholdLevels `json:"fetch,omitempty"` Query *SlowlogTresholdLevels `json:"query,omitempty"` @@ -35,8 +35,6 @@ func NewSlowlogTresholds() *SlowlogTresholds { return r } -// true - type SlowlogTresholdsVariant interface { SlowlogTresholdsCaster() *SlowlogTresholds } diff --git a/typedapi/types/smoothingmodelcontainer.go b/typedapi/types/smoothingmodelcontainer.go index 97e3ce239d..51c62b8b04 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // SmoothingModelContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L446-L462 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L446-L462 type SmoothingModelContainer struct { AdditionalSmoothingModelContainerProperty map[string]json.RawMessage `json:"-"` // Laplace A smoothing model that uses an additive smoothing where a constant (typically @@ -80,8 +80,6 @@ func NewSmoothingModelContainer() *SmoothingModelContainer { return r } -// true - type SmoothingModelContainerVariant interface { SmoothingModelContainerCaster() *SmoothingModelContainer } diff --git a/typedapi/types/snapshotcurrentcounts.go b/typedapi/types/snapshotcurrentcounts.go new file mode 100644 index 0000000000..01c43fb86e --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SnapshotCurrentCounts type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5fa0373a2c..1ceb338338 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SnapshotIndexStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotIndexStats.ts#L25-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ad5f3ec242..a6e769bf68 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SnapshotInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotInfo.ts#L41-L71 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 db319dd399..16d293b01a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SnapshotLifecycle type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/_types/SnapshotLifecycle.ts#L38-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c298b1bad9..095323d117 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SnapshotNodeInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L110-L113 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..695564f1eb --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SnapshotPolicyStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4d8b4f2d95..1f2c63d297 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SnapshotResponseItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/get/SnapshotGetResponse.ts#L49-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/get/SnapshotGetResponse.ts#L49-L53 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 a69c87f8c0..9d940c287e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SnapshotRestore type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/restore/SnapshotRestoreResponse.ts#L30-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 21884de91c..5941743bee 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,13 +31,13 @@ import ( // SnapshotShardFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotShardFailure.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f9198b48b7..cb53503044 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SnapshotShardsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotShardsStats.ts#L22-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotShardsStats.ts#L22-L47 type SnapshotShardsStats struct { // Done The number of shards that initialized, started, and finalized successfully. Done int64 `json:"done"` @@ -163,5 +163,3 @@ func NewSnapshotShardsStats() *SnapshotShardsStats { return r } - -// false diff --git a/typedapi/types/snapshotshardsstatus.go b/typedapi/types/snapshotshardsstatus.go index 970b376303..c4ffdafce5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // SnapshotShardsStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotShardsStatus.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 325e333fd5..9b00839588 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SnapshotsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/snapshots/types.ts#L24-L96 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 39305794d5..dc60c1d424 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SnapshotStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotStats.ts#L23-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotStats.ts#L23-L42 type SnapshotStats struct { // Incremental The number and size of files that still need to be copied as part of the // incremental snapshot. @@ -99,5 +99,3 @@ func NewSnapshotStats() *SnapshotStats { return r } - -// false diff --git a/typedapi/types/snowballanalyzer.go b/typedapi/types/snowballanalyzer.go index a3512fd3f8..8844c16f03 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,10 +32,10 @@ import ( // SnowballAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L374-L380 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L374-L380 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": @@ -113,8 +102,6 @@ func NewSnowballAnalyzer() *SnowballAnalyzer { return r } -// true - type SnowballAnalyzerVariant interface { SnowballAnalyzerCaster() *SnowballAnalyzer } @@ -122,3 +109,8 @@ type SnowballAnalyzerVariant interface { func (s *SnowballAnalyzer) SnowballAnalyzerCaster() *SnowballAnalyzer { return s } + +func (s *SnowballAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/snowballtokenfilter.go b/typedapi/types/snowballtokenfilter.go index 9f1e70dfa0..c958224d67 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,8 +32,9 @@ import ( // SnowballTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L310-L313 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -95,8 +96,6 @@ func NewSnowballTokenFilter() *SnowballTokenFilter { return r } -// true - type SnowballTokenFilterVariant interface { SnowballTokenFilterCaster() *SnowballTokenFilter } @@ -104,3 +103,8 @@ type SnowballTokenFilterVariant interface { func (s *SnowballTokenFilter) SnowballTokenFilterCaster() *SnowballTokenFilter { return s } + +func (s *SnowballTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/softdeletes.go b/typedapi/types/softdeletes.go index a0814dad04..08d68c47a7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SoftDeletes type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L51-L64 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -91,8 +91,6 @@ func NewSoftDeletes() *SoftDeletes { return r } -// true - type SoftDeletesVariant interface { SoftDeletesCaster() *SoftDeletes } diff --git a/typedapi/types/soranianalyzer.go b/typedapi/types/soranianalyzer.go index 371e57d0af..ce5521d006 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // SoraniAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L289-L294 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L289-L294 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": @@ -119,8 +108,6 @@ func NewSoraniAnalyzer() *SoraniAnalyzer { return r } -// true - type SoraniAnalyzerVariant interface { SoraniAnalyzerCaster() *SoraniAnalyzer } @@ -128,3 +115,8 @@ type SoraniAnalyzerVariant interface { func (s *SoraniAnalyzer) SoraniAnalyzerCaster() *SoraniAnalyzer { return s } + +func (s *SoraniAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/soraninormalizationtokenfilter.go b/typedapi/types/soraninormalizationtokenfilter.go new file mode 100644 index 0000000000..a6160fad94 --- /dev/null +++ b/typedapi/types/soraninormalizationtokenfilter.go @@ -0,0 +1,100 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// SoraniNormalizationTokenFilter type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type SoraniNormalizationTokenFilterVariant interface { + SoraniNormalizationTokenFilterCaster() *SoraniNormalizationTokenFilter +} + +func (s *SoraniNormalizationTokenFilter) SoraniNormalizationTokenFilterCaster() *SoraniNormalizationTokenFilter { + return s +} + +func (s *SoraniNormalizationTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/sort.go b/typedapi/types/sort.go index 6a5f53f543..d624045817 100644 --- a/typedapi/types/sort.go +++ b/typedapi/types/sort.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Sort type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/sort.ts#L104-L104 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L104-L104 type Sort []SortCombinations type SortVariant interface { diff --git a/typedapi/types/sortcombinations.go b/typedapi/types/sortcombinations.go index 7db49ad707..9802c49257 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // SortOptions // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/sort.ts#L98-L102 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L98-L102 type SortCombinations any type SortCombinationsVariant interface { diff --git a/typedapi/types/sortoptions.go b/typedapi/types/sortoptions.go index aeedc69094..c3693191c6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // SortOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/sort.ts#L86-L96 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/sort.ts#L86-L96 type SortOptions struct { Doc_ *ScoreSort `json:"_doc,omitempty"` GeoDistance_ *GeoDistanceSort `json:"_geo_distance,omitempty"` @@ -74,8 +74,6 @@ func NewSortOptions() *SortOptions { return r } -// true - type SortOptionsVariant interface { SortOptionsCaster() *SortOptions } @@ -83,3 +81,8 @@ type SortOptionsVariant interface { func (s *SortOptions) SortOptionsCaster() *SortOptions { return s } + +func (s *SortOptions) SortCombinationsCaster() *SortCombinations { + o := SortCombinations(s) + return &o +} diff --git a/typedapi/types/sortprocessor.go b/typedapi/types/sortprocessor.go index 4a9eac8c98..65764c083c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // SortProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1497-L1513 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1497-L1513 type SortProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -147,8 +147,6 @@ func NewSortProcessor() *SortProcessor { return r } -// true - type SortProcessorVariant interface { SortProcessorCaster() *SortProcessor } diff --git a/typedapi/types/sourceconfig.go b/typedapi/types/sourceconfig.go index efb8e0d715..2738e4ddae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // bool // SourceFilter // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/SourceFilter.ts#L33-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/SourceFilter.ts#L50-L54 type SourceConfig any type SourceConfigVariant interface { diff --git a/typedapi/types/sourceconfigparam.go b/typedapi/types/sourceconfigparam.go index 8294323920..a04a6d10d6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // bool // []string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/SourceFilter.ts#L39-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/SourceFilter.ts#L56-L62 type SourceConfigParam any diff --git a/typedapi/types/sourcefield.go b/typedapi/types/sourcefield.go index af6a026b73..6459c8b414 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // SourceField type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/meta-fields.ts#L58-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/meta-fields.ts#L58-L65 type SourceField struct { Compress *bool `json:"compress,omitempty"` CompressThreshold *string `json:"compress_threshold,omitempty"` @@ -125,8 +125,6 @@ func NewSourceField() *SourceField { return r } -// true - type SourceFieldVariant interface { SourceFieldCaster() *SourceField } diff --git a/typedapi/types/sourcefilter.go b/typedapi/types/sourcefilter.go index e7cebdbd1a..880c9c7247 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,13 +26,21 @@ import ( "errors" "fmt" "io" + "strconv" ) // SourceFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/SourceFilter.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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) @@ -105,8 +127,6 @@ func NewSourceFilter() *SourceFilter { return r } -// true - type SourceFilterVariant interface { SourceFilterCaster() *SourceFilter } @@ -114,3 +134,8 @@ type SourceFilterVariant interface { func (s *SourceFilter) SourceFilterCaster() *SourceFilter { return s } + +func (s *SourceFilter) SourceConfigCaster() *SourceConfig { + o := SourceConfig(s) + return &o +} diff --git a/typedapi/types/sourceindex.go b/typedapi/types/sourceindex.go index 72484c8f85..e6d7f80bec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SourceIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L50-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/migrate_reindex/MigrateReindexRequest.ts#L50-L52 type SourceIndex struct { Index string `json:"index"` } @@ -67,8 +67,6 @@ func NewSourceIndex() *SourceIndex { return r } -// true - type SourceIndexVariant interface { SourceIndexCaster() *SourceIndex } diff --git a/typedapi/types/sourceonlyrepository.go b/typedapi/types/sourceonlyrepository.go index 6e93fa4fd3..e59b6eb20c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SourceOnlyRepository type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L104-L114 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L104-L114 type SourceOnlyRepository struct { // Settings The repository settings. Settings SourceOnlyRepositorySettings `json:"settings"` @@ -95,8 +95,6 @@ func NewSourceOnlyRepository() *SourceOnlyRepository { return r } -// true - type SourceOnlyRepositoryVariant interface { SourceOnlyRepositoryCaster() *SourceOnlyRepository } @@ -104,3 +102,8 @@ type SourceOnlyRepositoryVariant interface { func (s *SourceOnlyRepository) SourceOnlyRepositoryCaster() *SourceOnlyRepository { return s } + +func (s *SourceOnlyRepository) RepositoryCaster() *Repository { + o := Repository(s) + return &o +} diff --git a/typedapi/types/sourceonlyrepositorysettings.go b/typedapi/types/sourceonlyrepositorysettings.go index 66b2a021cd..47ded3bb40 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SourceOnlyRepositorySettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotRepository.ts#L414-L441 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotRepository.ts#L414-L441 type SourceOnlyRepositorySettings struct { // ChunkSize Big files can be broken down into multiple smaller blobs in the blob store // during snapshotting. @@ -182,8 +182,6 @@ func NewSourceOnlyRepositorySettings() *SourceOnlyRepositorySettings { return r } -// true - type SourceOnlyRepositorySettingsVariant interface { SourceOnlyRepositorySettingsCaster() *SourceOnlyRepositorySettings } diff --git a/typedapi/types/spancontainingquery.go b/typedapi/types/spancontainingquery.go index 858d01915a..956e4f937a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SpanContainingQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/span.ts#L25-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -113,8 +113,6 @@ func NewSpanContainingQuery() *SpanContainingQuery { return r } -// true - type SpanContainingQueryVariant interface { SpanContainingQueryCaster() *SpanContainingQuery } diff --git a/typedapi/types/spanfieldmaskingquery.go b/typedapi/types/spanfieldmaskingquery.go index b1142ef548..f7f8ddf77b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SpanFieldMaskingQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/span.ts#L41-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -109,8 +109,6 @@ func NewSpanFieldMaskingQuery() *SpanFieldMaskingQuery { return r } -// true - type SpanFieldMaskingQueryVariant interface { SpanFieldMaskingQueryCaster() *SpanFieldMaskingQuery } diff --git a/typedapi/types/spanfirstquery.go b/typedapi/types/spanfirstquery.go index 426f6c0df1..889e685d60 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SpanFirstQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/span.ts#L49-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -122,8 +122,6 @@ func NewSpanFirstQuery() *SpanFirstQuery { return r } -// true - type SpanFirstQueryVariant interface { SpanFirstQueryCaster() *SpanFirstQuery } diff --git a/typedapi/types/spangapquery.go b/typedapi/types/spangapquery.go index e6aa96abf1..1afeb533a8 100644 --- a/typedapi/types/spangapquery.go +++ b/typedapi/types/spangapquery.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SpanGapQuery type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/span.ts#L63-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L63-L65 type SpanGapQuery map[string]int type SpanGapQueryVariant interface { diff --git a/typedapi/types/spanishanalyzer.go b/typedapi/types/spanishanalyzer.go index c5ce36fa58..e0603f0725 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // SpanishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L296-L301 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L296-L301 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": @@ -119,8 +108,6 @@ func NewSpanishAnalyzer() *SpanishAnalyzer { return r } -// true - type SpanishAnalyzerVariant interface { SpanishAnalyzerCaster() *SpanishAnalyzer } @@ -128,3 +115,8 @@ type SpanishAnalyzerVariant interface { func (s *SpanishAnalyzer) SpanishAnalyzerCaster() *SpanishAnalyzer { return s } + +func (s *SpanishAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/spanmultitermquery.go b/typedapi/types/spanmultitermquery.go index 3ba3e23374..74e82f87af 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SpanMultiTermQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/span.ts#L67-L75 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -105,8 +105,6 @@ func NewSpanMultiTermQuery() *SpanMultiTermQuery { return r } -// true - type SpanMultiTermQueryVariant interface { SpanMultiTermQueryCaster() *SpanMultiTermQuery } diff --git a/typedapi/types/spannearquery.go b/typedapi/types/spannearquery.go index f00a778248..a06178b902 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SpanNearQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/span.ts#L77-L93 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -138,8 +138,6 @@ func NewSpanNearQuery() *SpanNearQuery { return r } -// true - type SpanNearQueryVariant interface { SpanNearQueryCaster() *SpanNearQuery } diff --git a/typedapi/types/spannotquery.go b/typedapi/types/spannotquery.go index 9c4b9835c0..e6d13444d9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SpanNotQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/span.ts#L95-L122 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -169,8 +169,6 @@ func NewSpanNotQuery() *SpanNotQuery { return r } -// true - type SpanNotQueryVariant interface { SpanNotQueryCaster() *SpanNotQuery } diff --git a/typedapi/types/spanorquery.go b/typedapi/types/spanorquery.go index ff05abca45..fe4ba62f8e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SpanOrQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/span.ts#L124-L132 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -104,8 +104,6 @@ func NewSpanOrQuery() *SpanOrQuery { return r } -// true - type SpanOrQueryVariant interface { SpanOrQueryCaster() *SpanOrQuery } diff --git a/typedapi/types/spanquery.go b/typedapi/types/spanquery.go index b171625d9c..4ab07d64cf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SpanQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/span.ts#L159-L201 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L159-L201 type SpanQuery struct { AdditionalSpanQueryProperty map[string]json.RawMessage `json:"-"` // SpanContaining Accepts a list of span queries, but only returns those spans which also match @@ -184,8 +184,6 @@ func NewSpanQuery() *SpanQuery { return r } -// true - type SpanQueryVariant interface { SpanQueryCaster() *SpanQuery } diff --git a/typedapi/types/spantermquery.go b/typedapi/types/spantermquery.go index 4f60a49efa..30d26744e9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SpanTermQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/span.ts#L134-L141 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L134-L141 type SpanTermQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -108,8 +108,6 @@ func NewSpanTermQuery() *SpanTermQuery { return r } -// true - type SpanTermQueryVariant interface { SpanTermQueryCaster() *SpanTermQuery } diff --git a/typedapi/types/spanwithinquery.go b/typedapi/types/spanwithinquery.go index 0f697096a1..8dfc72987e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SpanWithinQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/span.ts#L143-L157 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/span.ts#L143-L157 type SpanWithinQuery struct { // Big Can be any span query. // Matching spans from `little` that are enclosed within `big` are returned. @@ -113,8 +113,6 @@ func NewSpanWithinQuery() *SpanWithinQuery { return r } -// true - type SpanWithinQueryVariant interface { SpanWithinQueryCaster() *SpanWithinQuery } diff --git a/typedapi/types/sparseembeddingresult.go b/typedapi/types/sparseembeddingresult.go index eea008b11b..cf516db0d1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SparseEmbeddingResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/Results.ts#L36-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 791f0c595c..5f2d975dbb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SparseVector type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/Results.ts#L24-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..5803ffef54 --- /dev/null +++ b/typedapi/types/sparsevectorindexoptions.go @@ -0,0 +1,103 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SparseVectorIndexOptions type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type SparseVectorIndexOptionsVariant interface { + SparseVectorIndexOptionsCaster() *SparseVectorIndexOptions +} + +func (s *SparseVectorIndexOptions) SparseVectorIndexOptionsCaster() *SparseVectorIndexOptions { + return s +} diff --git a/typedapi/types/sparsevectorproperty.go b/typedapi/types/sparsevectorproperty.go index c1c855e1d7..52715b590c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,14 +34,18 @@ import ( // SparseVectorProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L216-L218 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L226-L236 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, } @@ -796,8 +833,6 @@ func NewSparseVectorProperty() *SparseVectorProperty { return r } -// true - type SparseVectorPropertyVariant interface { SparseVectorPropertyCaster() *SparseVectorProperty } @@ -805,3 +840,8 @@ type SparseVectorPropertyVariant interface { func (s *SparseVectorProperty) SparseVectorPropertyCaster() *SparseVectorProperty { return s } + +func (s *SparseVectorProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/sparsevectorquery.go b/typedapi/types/sparsevectorquery.go index 4edd631c50..8570e086fc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SparseVectorQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/SparseVectorQuery.ts#L26-L80 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -222,8 +222,6 @@ func NewSparseVectorQuery() *SparseVectorQuery { return r } -// true - type SparseVectorQueryVariant interface { SparseVectorQueryCaster() *SparseVectorQuery } diff --git a/typedapi/types/sparsevectorstats.go b/typedapi/types/sparsevectorstats.go new file mode 100644 index 0000000000..e14b6aad0f --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// SparseVectorStats type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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..77afee68f2 --- /dev/null +++ b/typedapi/types/specifieddocument.go @@ -0,0 +1,82 @@ +// 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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" +) + +// SpecifiedDocument type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 +} + +type SpecifiedDocumentVariant interface { + SpecifiedDocumentCaster() *SpecifiedDocument +} + +func (s *SpecifiedDocument) SpecifiedDocumentCaster() *SpecifiedDocument { + return s +} diff --git a/typedapi/types/splitprocessor.go b/typedapi/types/splitprocessor.go index 9ed7f095e8..8a43086e86 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SplitProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1515-L1540 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1515-L1540 type SplitProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -184,8 +184,6 @@ func NewSplitProcessor() *SplitProcessor { return r } -// true - type SplitProcessorVariant interface { SplitProcessorCaster() *SplitProcessor } diff --git a/typedapi/types/sql.go b/typedapi/types/sql.go index 3ba7d4676a..60a901757f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Sql type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L392-L395 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L392-L395 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 e1c04e64d0..4712400ddb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Ssl type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L397-L400 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L397-L400 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 21a068d550..c9b8a84cb0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StagnatingBackingIndices type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/health_report/types.ts#L158-L162 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/health_report/types.ts#L159-L163 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 275b3b924b..9aa18c65b3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StandardAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L382-L402 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L382-L402 type StandardAnalyzer struct { // MaxTokenLength The maximum token length. If a token is seen that exceeds this length then it // is split at `max_token_length` intervals. @@ -40,7 +40,7 @@ type StandardAnalyzer struct { // Stopwords A pre-defined stop words list like `_english_` or an array containing a list // of stop words. // Defaults to `_none_`. - Stopwords []string `json:"stopwords,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` // StopwordsPath The path to a file containing stop words. StopwordsPath *string `json:"stopwords_path,omitempty"` Type string `json:"type,omitempty"` @@ -78,19 +78,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 "stopwords_path": @@ -137,8 +126,6 @@ func NewStandardAnalyzer() *StandardAnalyzer { return r } -// true - type StandardAnalyzerVariant interface { StandardAnalyzerCaster() *StandardAnalyzer } @@ -146,3 +133,8 @@ type StandardAnalyzerVariant interface { func (s *StandardAnalyzer) StandardAnalyzerCaster() *StandardAnalyzer { return s } + +func (s *StandardAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/standarddeviationbounds.go b/typedapi/types/standarddeviationbounds.go index 8ae656703b..9fda175ca4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // StandardDeviationBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L281-L288 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8f8eccbcba..c8cfd4995c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StandardDeviationBoundsAsString type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L290-L297 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bbcdd53b2c..8f0d471035 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StandardRetriever type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Retriever.ts#L51-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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) @@ -157,8 +171,6 @@ func NewStandardRetriever() *StandardRetriever { return r } -// true - type StandardRetrieverVariant interface { StandardRetrieverCaster() *StandardRetriever } diff --git a/typedapi/types/standardtokenizer.go b/typedapi/types/standardtokenizer.go index fd3c557e78..648e6e0c0c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StandardTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L121-L124 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L123-L126 type StandardTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` @@ -105,8 +105,6 @@ func NewStandardTokenizer() *StandardTokenizer { return r } -// true - type StandardTokenizerVariant interface { StandardTokenizerCaster() *StandardTokenizer } @@ -114,3 +112,8 @@ type StandardTokenizerVariant interface { func (s *StandardTokenizer) StandardTokenizerCaster() *StandardTokenizer { return s } + +func (s *StandardTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/statistics.go b/typedapi/types/statistics.go index 26ae7532ed..484fa643c9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Statistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/slm/_types/SnapshotLifecycle.ts#L61-L84 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 67980cab41..33e6ef3fb4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // Stats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L30-L114 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a073a53f7a..2c2ce02441 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L257-L273 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1d3b4eeb21..787de16f92 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L291-L291 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L314-L314 type StatsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -96,8 +96,6 @@ func NewStatsAggregation() *StatsAggregation { return r } -// true - type StatsAggregationVariant interface { StatsAggregationCaster() *StatsAggregation } diff --git a/typedapi/types/statsbucketaggregate.go b/typedapi/types/statsbucketaggregate.go index 78225f7153..b31b4ae575 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StatsBucketAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L275-L279 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bd915082d4..8bbd23e027 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // StatsBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L410-L410 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -94,8 +94,6 @@ func NewStatsBucketAggregation() *StatsBucketAggregation { return r } -// true - type StatsBucketAggregationVariant interface { StatsBucketAggregationCaster() *StatsBucketAggregation } diff --git a/typedapi/types/status.go b/typedapi/types/status.go index a0a5cd1384..3375396bb2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Status type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/_types/SnapshotStatus.ts#L26-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/snapshot/_types/SnapshotStatus.ts#L26-L60 type Status struct { // IncludeGlobalState Indicates whether the current cluster state is included in the snapshot. IncludeGlobalState bool `json:"include_global_state"` @@ -156,5 +156,3 @@ func NewStatus() *Status { return r } - -// false diff --git a/typedapi/types/statuserror.go b/typedapi/types/statuserror.go index b527ddb195..2c76c8b87b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StatusError type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L44-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 38bc464be0..d48196a41e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StatusInProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_migrate_reindex_status/MigrateGetReindexStatusResponse.ts#L38-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 aa721bac7c..ce57356666 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,15 @@ import ( // StemmerOverrideTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L315-L319 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -108,8 +111,6 @@ func NewStemmerOverrideTokenFilter() *StemmerOverrideTokenFilter { return r } -// true - type StemmerOverrideTokenFilterVariant interface { StemmerOverrideTokenFilterCaster() *StemmerOverrideTokenFilter } @@ -117,3 +118,8 @@ type StemmerOverrideTokenFilterVariant interface { func (s *StemmerOverrideTokenFilter) StemmerOverrideTokenFilterCaster() *StemmerOverrideTokenFilter { return s } + +func (s *StemmerOverrideTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/stemmertokenfilter.go b/typedapi/types/stemmertokenfilter.go index ab45fa295b..c26254f8ab 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StemmerTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L321-L325 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L425-L429 type StemmerTokenFilter struct { Language *string `json:"language,omitempty"` Type string `json:"type,omitempty"` @@ -101,8 +101,6 @@ func NewStemmerTokenFilter() *StemmerTokenFilter { return r } -// true - type StemmerTokenFilterVariant interface { StemmerTokenFilterCaster() *StemmerTokenFilter } @@ -110,3 +108,8 @@ type StemmerTokenFilterVariant interface { func (s *StemmerTokenFilter) StemmerTokenFilterCaster() *StemmerTokenFilter { return s } + +func (s *StemmerTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/stepkey.go b/typedapi/types/stepkey.go index 3b4aae4223..fd1b523bc5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StepKey type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/move_to_step/types.ts#L20-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -103,8 +103,6 @@ func NewStepKey() *StepKey { return r } -// true - type StepKeyVariant interface { StepKeyCaster() *StepKey } diff --git a/typedapi/types/stopanalyzer.go b/typedapi/types/stopanalyzer.go index 33e1fe76c7..72c7a97053 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // StopAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L404-L419 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L404-L419 type StopAnalyzer struct { // Stopwords A pre-defined stop words list like `_english_` or an array containing a list // of stop words. // Defaults to `_none_`. - Stopwords []string `json:"stopwords,omitempty"` + Stopwords StopWords `json:"stopwords,omitempty"` // StopwordsPath The path to a file containing stop words. StopwordsPath *string `json:"stopwords_path,omitempty"` Type string `json:"type,omitempty"` @@ -59,19 +59,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": @@ -123,8 +112,6 @@ func NewStopAnalyzer() *StopAnalyzer { return r } -// true - type StopAnalyzerVariant interface { StopAnalyzerCaster() *StopAnalyzer } @@ -132,3 +119,8 @@ type StopAnalyzerVariant interface { func (s *StopAnalyzer) StopAnalyzerCaster() *StopAnalyzer { return s } + +func (s *StopAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/stoptokenfilter.go b/typedapi/types/stoptokenfilter.go index 7a9821de9a..327fe38e96 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,14 +31,24 @@ import ( // StopTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L96-L102 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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": @@ -151,8 +150,6 @@ func NewStopTokenFilter() *StopTokenFilter { return r } -// true - type StopTokenFilterVariant interface { StopTokenFilterCaster() *StopTokenFilter } @@ -160,3 +157,8 @@ type StopTokenFilterVariant interface { func (s *StopTokenFilter) StopTokenFilterCaster() *StopTokenFilter { return s } + +func (s *StopTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/stopwords.go b/typedapi/types/stopwords.go index bc0e2f24e1..97b66454e2 100644 --- a/typedapi/types/stopwords.go +++ b/typedapi/types/stopwords.go @@ -16,14 +16,17 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types -// StopWords type alias. +// StopWords holds the union for the following types: // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/StopWords.ts#L20-L26 -type StopWords []string +// stopwordlanguage.StopWordLanguage +// []string +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/StopWords.ts#L60-L66 +type StopWords any type StopWordsVariant interface { StopWordsCaster() *StopWords diff --git a/typedapi/types/storage.go b/typedapi/types/storage.go index 56275b1b8d..fee0116273 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // Storage type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L534-L543 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L547-L558 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) @@ -92,8 +99,6 @@ func NewStorage() *Storage { return r } -// true - type StorageVariant interface { StorageCaster() *Storage } diff --git a/typedapi/types/storedscript.go b/typedapi/types/storedscript.go index 8cf56e6e2c..28c12d8fff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // StoredScript type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Scripting.ts#L51-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Scripting.ts#L51-L63 type StoredScript struct { // Lang The language the script is written in. // For search templates, use `mustache`. @@ -121,8 +121,6 @@ func NewStoredScript() *StoredScript { return r } -// true - type StoredScriptVariant interface { StoredScriptCaster() *StoredScript } diff --git a/typedapi/types/storestats.go b/typedapi/types/storestats.go index 629748aca9..c99e06f5b3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StoreStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L373-L400 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L398-L425 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 4a4971bad0..eb9311b028 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // StreamResult type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Binary.ts#L24-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Binary.ts#L24-L24 type StreamResult []byte diff --git a/typedapi/types/stringifiedboolean.go b/typedapi/types/stringifiedboolean.go index 92ea32ed0c..2346cc1e51 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // bool // string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/Stringified.ts#L20-L27 type Stringifiedboolean any type StringifiedbooleanVariant interface { diff --git a/typedapi/types/stringifieddouble.go b/typedapi/types/stringifieddouble.go index 5cbec8df65..b8c835b6dd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // Float64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/Stringified.ts#L20-L27 type Stringifieddouble any diff --git a/typedapi/types/stringifiedepochtimeunitmillis.go b/typedapi/types/stringifiedepochtimeunitmillis.go index 70c875e16c..25d9074b65 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/Stringified.ts#L20-L27 type StringifiedEpochTimeUnitMillis any type StringifiedEpochTimeUnitMillisVariant interface { diff --git a/typedapi/types/stringifiedepochtimeunitseconds.go b/typedapi/types/stringifiedepochtimeunitseconds.go index 8feeba4098..1eabe71282 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/Stringified.ts#L20-L27 type StringifiedEpochTimeUnitSeconds any diff --git a/typedapi/types/stringifiedinteger.go b/typedapi/types/stringifiedinteger.go index 90d345987f..d56fa08eb1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // int // string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/Stringified.ts#L20-L27 type Stringifiedinteger any type StringifiedintegerVariant interface { diff --git a/typedapi/types/stringifiedversionnumber.go b/typedapi/types/stringifiedversionnumber.go index 6f117fa281..39d14b3e7a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // int64 // string // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_spec_utils/Stringified.ts#L20-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_spec_utils/Stringified.ts#L20-L27 type StringifiedVersionNumber any diff --git a/typedapi/types/stringraretermsaggregate.go b/typedapi/types/stringraretermsaggregate.go index 6951b4d6d1..4027199ff3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // StringRareTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L483-L487 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 87fc26b93a..1564493c1c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // StringRareTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L489-L491 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a517ea25a6..23856cc38a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StringStatsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L793-L804 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f6fbec5257..5b74794dc8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StringStatsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L293-L299 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L316-L322 type StringStatsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -99,8 +99,6 @@ func NewStringStatsAggregation() *StringStatsAggregation { return r } -// true - type StringStatsAggregationVariant interface { StringStatsAggregationCaster() *StringStatsAggregation } diff --git a/typedapi/types/stringtermsaggregate.go b/typedapi/types/stringtermsaggregate.go index a63e1dbeb4..a178e8ba01 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StringTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L424-L429 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ecf22068db..e24047930e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // StringTermsBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L435-L437 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 485308ceb2..a620215571 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // StupidBackoffSmoothingModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L464-L469 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L464-L469 type StupidBackoffSmoothingModel struct { // Discount A constant factor that the lower order n-gram model is discounted by. Discount Float64 `json:"discount"` @@ -80,8 +80,6 @@ func NewStupidBackoffSmoothingModel() *StupidBackoffSmoothingModel { return r } -// true - type StupidBackoffSmoothingModelVariant interface { StupidBackoffSmoothingModelCaster() *StupidBackoffSmoothingModel } diff --git a/typedapi/types/suggest.go b/typedapi/types/suggest.go index 79b2cabc4d..482b4a1c56 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,5 +26,5 @@ package types // PhraseSuggest // TermSuggest // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L35-L41 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L35-L41 type Suggest any diff --git a/typedapi/types/suggestcontext.go b/typedapi/types/suggestcontext.go index dbb6f902a2..2c2944f572 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,11 @@ import ( // SuggestContext type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/specialized.ts#L43-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -100,8 +100,6 @@ func NewSuggestContext() *SuggestContext { return r } -// true - type SuggestContextVariant interface { SuggestContextCaster() *SuggestContext } diff --git a/typedapi/types/suggester.go b/typedapi/types/suggester.go index b1d8f5ade4..36c7f40163 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Suggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L102-L108 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L102-L108 type Suggester struct { Suggesters map[string]FieldSuggester `json:"-"` // Text Global suggest text, to avoid repetition when the same text is used in @@ -122,8 +122,6 @@ func NewSuggester() *Suggester { return r } -// true - type SuggesterVariant interface { SuggesterCaster() *Suggester } diff --git a/typedapi/types/suggestfuzziness.go b/typedapi/types/suggestfuzziness.go index 622d7d721e..95ff3acc23 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SuggestFuzziness type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L197-L225 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L197-L225 type SuggestFuzziness struct { // Fuzziness The fuzziness factor. Fuzziness Fuzziness `json:"fuzziness,omitempty"` @@ -139,8 +139,6 @@ func NewSuggestFuzziness() *SuggestFuzziness { return r } -// true - type SuggestFuzzinessVariant interface { SuggestFuzzinessCaster() *SuggestFuzziness } diff --git a/typedapi/types/sumaggregate.go b/typedapi/types/sumaggregate.go index 60fc22f634..fd7505e9a6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SumAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L211-L216 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a4bce79e9c..dbf2e3dd47 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SumAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L301-L301 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L324-L324 type SumAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -96,8 +96,6 @@ func NewSumAggregation() *SumAggregation { return r } -// true - type SumAggregationVariant interface { SumAggregationCaster() *SumAggregation } diff --git a/typedapi/types/sumbucketaggregation.go b/typedapi/types/sumbucketaggregation.go index 3bdd9bf1fc..2ff05fe8a5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // SumBucketAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/pipeline.ts#L412-L415 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -94,8 +94,6 @@ func NewSumBucketAggregation() *SumBucketAggregation { return r } -// true - type SumBucketAggregationVariant interface { SumBucketAggregationCaster() *SumBucketAggregation } diff --git a/typedapi/types/summary.go b/typedapi/types/summary.go index 80fba81bec..df6c94c290 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // Summary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/enrich/_types/Policy.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4feb0dd4ba..47a103f1a2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SummaryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L193-L202 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 13c2361208..59b4de1acb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // SwedishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L303-L308 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L303-L308 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": @@ -119,8 +108,6 @@ func NewSwedishAnalyzer() *SwedishAnalyzer { return r } -// true - type SwedishAnalyzerVariant interface { SwedishAnalyzerCaster() *SwedishAnalyzer } @@ -128,3 +115,8 @@ type SwedishAnalyzerVariant interface { func (s *SwedishAnalyzer) SwedishAnalyzerCaster() *SwedishAnalyzer { return s } + +func (s *SwedishAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/synccontainer.go b/typedapi/types/synccontainer.go index b2b3e6504c..ddcffcb5dc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // SyncContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/_types/Transform.ts#L169-L175 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -73,8 +73,6 @@ func NewSyncContainer() *SyncContainer { return r } -// true - type SyncContainerVariant interface { SyncContainerCaster() *SyncContainer } diff --git a/typedapi/types/syncjobconnectorreference.go b/typedapi/types/syncjobconnectorreference.go index aa3bb71d42..e23199407e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SyncJobConnectorReference type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/SyncJob.ts#L31-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f950f50042..daa309b68d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // SyncRulesFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L219-L228 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L219-L228 type SyncRulesFeature struct { // Advanced Indicates whether advanced sync rules are enabled. Advanced *FeatureEnabled `json:"advanced,omitempty"` @@ -37,8 +37,6 @@ func NewSyncRulesFeature() *SyncRulesFeature { return r } -// true - type SyncRulesFeatureVariant interface { SyncRulesFeatureCaster() *SyncRulesFeature } diff --git a/typedapi/types/synonymgraphtokenfilter.go b/typedapi/types/synonymgraphtokenfilter.go index ca543ae72f..232452713b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,18 +33,31 @@ import ( // SynonymGraphTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L109-L119 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -193,8 +206,6 @@ func NewSynonymGraphTokenFilter() *SynonymGraphTokenFilter { return r } -// true - type SynonymGraphTokenFilterVariant interface { SynonymGraphTokenFilterCaster() *SynonymGraphTokenFilter } @@ -202,3 +213,8 @@ type SynonymGraphTokenFilterVariant interface { func (s *SynonymGraphTokenFilter) SynonymGraphTokenFilterCaster() *SynonymGraphTokenFilter { return s } + +func (s *SynonymGraphTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/synonymrule.go b/typedapi/types/synonymrule.go index 0212b19419..b489d61676 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SynonymRule type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/synonyms/_types/SynonymRule.ts#L26-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -77,8 +77,6 @@ func NewSynonymRule() *SynonymRule { return r } -// true - type SynonymRuleVariant interface { SynonymRuleCaster() *SynonymRule } diff --git a/typedapi/types/synonymruleread.go b/typedapi/types/synonymruleread.go index 46a9fe2461..2411794780 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // SynonymRuleRead type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/synonyms/_types/SynonymRule.ts#L40-L50 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/synonyms/_types/SynonymRule.ts#L40-L50 type SynonymRuleRead struct { // Id Synonym Rule identifier Id string `json:"id"` @@ -74,5 +74,3 @@ func NewSynonymRuleRead() *SynonymRuleRead { return r } - -// false diff --git a/typedapi/types/synonymssetitem.go b/typedapi/types/synonymssetitem.go index 6aba9d7092..45ef0f08a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // SynonymsSetItem type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/synonyms/get_synonyms_sets/SynonymsSetsGetResponse.ts#L36-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3a37feda9f..d8b1800a99 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,15 +29,15 @@ import ( "strconv" ) -// NodeInfoNetwork type. +// SynonymsStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/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/907d11a72a6bfd37b777d526880c56202889609e/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 dae527b8fa..c9dcc3f8ef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,18 +33,31 @@ import ( // SynonymTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L121-L131 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -193,8 +206,6 @@ func NewSynonymTokenFilter() *SynonymTokenFilter { return r } -// true - type SynonymTokenFilterVariant interface { SynonymTokenFilterCaster() *SynonymTokenFilter } @@ -202,3 +213,8 @@ type SynonymTokenFilterVariant interface { func (s *SynonymTokenFilter) SynonymTokenFilterCaster() *SynonymTokenFilter { return s } + +func (s *SynonymTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/tablevaluescontainer.go b/typedapi/types/tablevaluescontainer.go index d4ab753c68..c01d5432d3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // TableValuesContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/_types/TableValuesContainer.ts#L22-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/TableValuesContainer.ts#L22-L28 type TableValuesContainer struct { AdditionalTableValuesContainerProperty map[string]json.RawMessage `json:"-"` Float64 [][]Float64 `json:"double,omitempty"` @@ -74,8 +74,6 @@ func NewTableValuesContainer() *TableValuesContainer { return r } -// true - type TableValuesContainerVariant interface { TableValuesContainerCaster() *TableValuesContainer } diff --git a/typedapi/types/tablevaluesintegervalue.go b/typedapi/types/tablevaluesintegervalue.go index 649ba8a7ba..4869d11443 100644 --- a/typedapi/types/tablevaluesintegervalue.go +++ b/typedapi/types/tablevaluesintegervalue.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TableValuesIntegerValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/_types/TableValuesContainer.ts#L30-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/TableValuesContainer.ts#L30-L30 type TableValuesIntegerValue []int type TableValuesIntegerValueVariant interface { diff --git a/typedapi/types/tablevalueskeywordvalue.go b/typedapi/types/tablevalueskeywordvalue.go index 07108f65f6..5aa53dac11 100644 --- a/typedapi/types/tablevalueskeywordvalue.go +++ b/typedapi/types/tablevalueskeywordvalue.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TableValuesKeywordValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/_types/TableValuesContainer.ts#L31-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/TableValuesContainer.ts#L31-L31 type TableValuesKeywordValue []string type TableValuesKeywordValueVariant interface { diff --git a/typedapi/types/tablevalueslongdouble.go b/typedapi/types/tablevalueslongdouble.go index 46a4465ef3..e1727f9847 100644 --- a/typedapi/types/tablevalueslongdouble.go +++ b/typedapi/types/tablevalueslongdouble.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TableValuesLongDouble type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/_types/TableValuesContainer.ts#L33-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/TableValuesContainer.ts#L33-L33 type TableValuesLongDouble []Float64 type TableValuesLongDoubleVariant interface { diff --git a/typedapi/types/tablevalueslongvalue.go b/typedapi/types/tablevalueslongvalue.go index 949d660472..f71392cc69 100644 --- a/typedapi/types/tablevalueslongvalue.go +++ b/typedapi/types/tablevalueslongvalue.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TableValuesLongValue type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/esql/_types/TableValuesContainer.ts#L32-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/esql/_types/TableValuesContainer.ts#L32-L32 type TableValuesLongValue []int64 type TableValuesLongValueVariant interface { diff --git a/typedapi/types/targetmeanencodingpreprocessor.go b/typedapi/types/targetmeanencodingpreprocessor.go index 0e6c1cc31d..6753a1b6ef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TargetMeanEncodingPreprocessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/types.ts#L49-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L49-L54 type TargetMeanEncodingPreprocessor struct { DefaultValue Float64 `json:"default_value"` FeatureName string `json:"feature_name"` @@ -116,8 +116,6 @@ func NewTargetMeanEncodingPreprocessor() *TargetMeanEncodingPreprocessor { return r } -// true - type TargetMeanEncodingPreprocessorVariant interface { TargetMeanEncodingPreprocessorCaster() *TargetMeanEncodingPreprocessor } diff --git a/typedapi/types/taskfailure.go b/typedapi/types/taskfailure.go index 01707e0888..a7bd104bae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TaskFailure type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Errors.ts#L67-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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/taskinfo.go b/typedapi/types/taskinfo.go index 6c4d125ab0..b3c5ba9468 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TaskInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/tasks/_types/TaskInfo.ts#L32-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/_types/TaskInfo.ts#L32-L58 type TaskInfo struct { Action string `json:"action"` Cancellable bool `json:"cancellable"` @@ -50,7 +50,7 @@ type TaskInfo struct { Headers map[string]string `json:"headers"` Id int64 `json:"id"` Node string `json:"node"` - ParentTaskId TaskId `json:"parent_task_id,omitempty"` + ParentTaskId *string `json:"parent_task_id,omitempty"` RunningTime Duration `json:"running_time,omitempty"` RunningTimeInNanos int64 `json:"running_time_in_nanos"` StartTimeInMillis int64 `json:"start_time_in_millis"` @@ -210,5 +210,3 @@ func NewTaskInfo() *TaskInfo { return r } - -// false diff --git a/typedapi/types/taskinfos.go b/typedapi/types/taskinfos.go index 22289b6dfa..436f60ac1d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // []TaskInfo // map[string]ParentTaskInfo // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/tasks/_types/TaskListResponseBase.ts#L40-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/tasks/_types/TaskListResponseBase.ts#L40-L43 type TaskInfos any diff --git a/typedapi/types/tasksrecord.go b/typedapi/types/tasksrecord.go index 02659da841..263402a61d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TasksRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/tasks/types.ts#L22-L101 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 08a5256612..b6adc772e0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,16 +27,25 @@ import ( "fmt" "io" "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/tdigestexecutionhint" ) // TDigest type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L232-L237 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -82,8 +96,6 @@ func NewTDigest() *TDigest { return r } -// true - type TDigestVariant interface { TDigestCaster() *TDigest } diff --git a/typedapi/types/tdigestpercentileranksaggregate.go b/typedapi/types/tdigestpercentileranksaggregate.go index 94025bf88c..e12a12a94e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TDigestPercentileRanksAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L177-L178 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f0427985e0..86417e8e82 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TDigestPercentilesAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L174-L175 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7fc7144204..227890b09f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Template type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/simulate_template/IndicesSimulateTemplateResponse.ts#L33-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8a900ffe55..5820272605 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TemplateConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/msearch_template/types.ts#L29-L55 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/msearch_template/types.ts#L29-L55 type TemplateConfig struct { // Explain If `true`, returns detailed information about score calculation as part of // each hit. @@ -158,8 +158,6 @@ func NewTemplateConfig() *TemplateConfig { return r } -// true - type TemplateConfigVariant interface { TemplateConfigCaster() *TemplateConfig } @@ -167,3 +165,8 @@ type TemplateConfigVariant interface { func (s *TemplateConfig) TemplateConfigCaster() *TemplateConfig { return s } + +func (s *TemplateConfig) RequestItemCaster() *RequestItem { + o := RequestItem(s) + return &o +} diff --git a/typedapi/types/templatemapping.go b/typedapi/types/templatemapping.go index c8f2936596..2b5216762a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TemplateMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/TemplateMapping.ts#L27-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0f75fd60c4..7f782e8630 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TemplatesRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/templates/types.ts#L22-L48 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 519af2f232..b3b71ef2a7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Term type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/termvectors/types.ts#L34-L40 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 52c45177ad..32aa8c23ca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TerminateProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1542-L1542 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1542-L1542 type TerminateProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -122,8 +122,6 @@ func NewTerminateProcessor() *TerminateProcessor { return r } -// true - type TerminateProcessorVariant interface { TerminateProcessorCaster() *TerminateProcessor } diff --git a/typedapi/types/termquery.go b/typedapi/types/termquery.go index fd8ebec2dd..1f578d4a90 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TermQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L238-L255 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L234-L251 type TermQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -128,8 +128,6 @@ func NewTermQuery() *TermQuery { return r } -// true - type TermQueryVariant interface { TermQueryCaster() *TermQuery } diff --git a/typedapi/types/termrangequery.go b/typedapi/types/termrangequery.go index 2e7b1cb479..1f4599d9e6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // TermRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L174-L174 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L170-L170 type TermRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -41,7 +41,6 @@ type TermRangeQuery 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"` - From *string `json:"from,omitempty"` // Gt Greater than. Gt *string `json:"gt,omitempty"` // Gte Greater than or equal to. @@ -53,7 +52,6 @@ type TermRangeQuery struct { QueryName_ *string `json:"_name,omitempty"` // Relation Indicates how the range query matches values for `range` fields. Relation *rangerelation.RangeRelation `json:"relation,omitempty"` - To *string `json:"to,omitempty"` } func (s *TermRangeQuery) UnmarshalJSON(data []byte) error { @@ -87,18 +85,6 @@ func (s *TermRangeQuery) UnmarshalJSON(data []byte) error { s.Boost = &f } - case "from": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "From", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.From = &o - case "gt": var tmp json.RawMessage if err := dec.Decode(&tmp); err != nil { @@ -164,18 +150,6 @@ func (s *TermRangeQuery) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Relation", err) } - case "to": - var tmp json.RawMessage - if err := dec.Decode(&tmp); err != nil { - return fmt.Errorf("%s | %w", "To", err) - } - o := string(tmp[:]) - o, err = strconv.Unquote(o) - if err != nil { - o = string(tmp[:]) - } - s.To = &o - } } return nil @@ -188,8 +162,6 @@ func NewTermRangeQuery() *TermRangeQuery { return r } -// true - type TermRangeQueryVariant interface { TermRangeQueryCaster() *TermRangeQuery } @@ -197,3 +169,8 @@ type TermRangeQueryVariant interface { func (s *TermRangeQuery) TermRangeQueryCaster() *TermRangeQuery { return s } + +func (s *TermRangeQuery) RangeQueryCaster() *RangeQuery { + o := RangeQuery(s) + return &o +} diff --git a/typedapi/types/termsaggregation.go b/typedapi/types/termsaggregation.go index 03d03b41c3..fcb0ddffb5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // TermsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L963-L1031 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L963-L1031 type TermsAggregation struct { // CollectMode Determines how child aggregations should be calculated: breadth-first or // depth-first. @@ -327,8 +327,6 @@ func NewTermsAggregation() *TermsAggregation { return r } -// true - type TermsAggregationVariant interface { TermsAggregationCaster() *TermsAggregation } diff --git a/typedapi/types/termsexclude.go b/typedapi/types/termsexclude.go index 3d37c7dfb3..5f67be8c6c 100644 --- a/typedapi/types/termsexclude.go +++ b/typedapi/types/termsexclude.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TermsExclude type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1077-L1078 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1077-L1078 type TermsExclude []string type TermsExcludeVariant interface { diff --git a/typedapi/types/termsgrouping.go b/typedapi/types/termsgrouping.go index 1ba6c83272..52b0b2c348 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TermsGrouping type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/rollup/_types/Groupings.ts#L75-L82 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -81,8 +81,6 @@ func NewTermsGrouping() *TermsGrouping { return r } -// true - type TermsGroupingVariant interface { TermsGroupingCaster() *TermsGrouping } diff --git a/typedapi/types/termsinclude.go b/typedapi/types/termsinclude.go index a106976321..674920f160 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ package types // []string // TermsPartition // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1074-L1075 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1074-L1075 type TermsInclude any type TermsIncludeVariant interface { diff --git a/typedapi/types/termslookup.go b/typedapi/types/termslookup.go index 7efefb3a62..5031bffd8a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TermsLookup type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L270-L275 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L266-L271 type TermsLookup struct { Id string `json:"id"` Index string `json:"index"` @@ -85,8 +85,6 @@ func NewTermsLookup() *TermsLookup { return r } -// true - type TermsLookupVariant interface { TermsLookupCaster() *TermsLookup } @@ -94,3 +92,8 @@ type TermsLookupVariant interface { func (s *TermsLookup) TermsLookupCaster() *TermsLookup { return s } + +func (s *TermsLookup) TermsQueryFieldCaster() *TermsQueryField { + o := TermsQueryField(s) + return &o +} diff --git a/typedapi/types/termspartition.go b/typedapi/types/termspartition.go index d24f8d6d38..f0ffad538f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TermsPartition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1080-L1089 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1080-L1089 type TermsPartition struct { // NumPartitions The number of partitions. NumPartitions int64 `json:"num_partitions"` @@ -96,8 +96,6 @@ func NewTermsPartition() *TermsPartition { return r } -// true - type TermsPartitionVariant interface { TermsPartitionCaster() *TermsPartition } @@ -105,3 +103,8 @@ type TermsPartitionVariant interface { func (s *TermsPartition) TermsPartitionCaster() *TermsPartition { return s } + +func (s *TermsPartition) TermsIncludeCaster() *TermsInclude { + o := TermsInclude(s) + return &o +} diff --git a/typedapi/types/termsquery.go b/typedapi/types/termsquery.go index 324a5e7203..88080eb7df 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TermsQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L257-L263 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L253-L259 type TermsQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -142,8 +142,6 @@ func NewTermsQuery() *TermsQuery { return r } -// true - type TermsQueryVariant interface { TermsQueryCaster() *TermsQuery } diff --git a/typedapi/types/termsqueryfield.go b/typedapi/types/termsqueryfield.go index 93756cc530..64e3f655dd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // []FieldValue // TermsLookup // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L265-L268 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L261-L264 type TermsQueryField any type TermsQueryFieldVariant interface { diff --git a/typedapi/types/termssetquery.go b/typedapi/types/termssetquery.go index 11e22a4292..cbc91eea63 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TermsSetQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L277-L299 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L273-L295 type TermsSetQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -128,8 +128,6 @@ func NewTermsSetQuery() *TermsSetQuery { return r } -// true - type TermsSetQueryVariant interface { TermsSetQueryCaster() *TermsSetQuery } diff --git a/typedapi/types/termsuggest.go b/typedapi/types/termsuggest.go index 693d7d90a1..2ed33e78d3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TermSuggest type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L65-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L65-L70 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 9935b1497a..564aeafe2e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -35,7 +35,7 @@ import ( // TermSuggester type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L507-L569 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L507-L569 type TermSuggester struct { // Analyzer The analyzer to analyze the suggest text with. // Defaults to the search analyzer of the suggest field. @@ -301,8 +301,6 @@ func NewTermSuggester() *TermSuggester { return r } -// true - type TermSuggesterVariant interface { TermSuggesterCaster() *TermSuggester } diff --git a/typedapi/types/termsuggestoption.go b/typedapi/types/termsuggestoption.go index aa518a3871..5ee9e24c66 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TermSuggestOption type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/suggester.ts#L94-L100 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/suggester.ts#L94-L100 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 faab970fec..75263f55ef 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TermVector type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/termvectors/types.ts#L23-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e0c165e52d..0cd15158cd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TermVectorsFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/termvectors/types.ts#L49-L86 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/termvectors/types.ts#L49-L86 type TermVectorsFilter struct { // MaxDocFreq Ignore words which occur in more than this many docs. // Defaults to unbounded. @@ -191,8 +191,6 @@ func NewTermVectorsFilter() *TermVectorsFilter { return r } -// true - type TermVectorsFilterVariant interface { TermVectorsFilterCaster() *TermVectorsFilter } diff --git a/typedapi/types/termvectorsresult.go b/typedapi/types/termvectorsresult.go index 05cf4292a6..23d0e6e7b0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TermVectorsResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/mtermvectors/types.ts#L96-L104 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 acb7fd6e2b..ae917b3332 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TermVectorsToken type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/termvectors/types.ts#L42-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 20aa3ae939..82514cde2b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TestPopulation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L319-L329 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L342-L352 type TestPopulation struct { // Field The field to aggregate. Field string `json:"field"` @@ -81,8 +81,6 @@ func NewTestPopulation() *TestPopulation { return r } -// true - type TestPopulationVariant interface { TestPopulationCaster() *TestPopulation } diff --git a/typedapi/types/textclassificationinferenceoptions.go b/typedapi/types/textclassificationinferenceoptions.go index 6d67e3133f..fe5594ee1e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TextClassificationInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L202-L214 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -116,8 +116,6 @@ func NewTextClassificationInferenceOptions() *TextClassificationInferenceOptions return r } -// true - type TextClassificationInferenceOptionsVariant interface { TextClassificationInferenceOptionsCaster() *TextClassificationInferenceOptions } diff --git a/typedapi/types/textclassificationinferenceupdateoptions.go b/typedapi/types/textclassificationinferenceupdateoptions.go index ee5c0200c9..9eb29583bd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TextClassificationInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L382-L391 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -110,8 +110,6 @@ func NewTextClassificationInferenceUpdateOptions() *TextClassificationInferenceU return r } -// true - type TextClassificationInferenceUpdateOptionsVariant interface { TextClassificationInferenceUpdateOptionsCaster() *TextClassificationInferenceUpdateOptions } diff --git a/typedapi/types/textembedding.go b/typedapi/types/textembedding.go index 58bb3f456d..ff4993818d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TextEmbedding type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Knn.ts#L94-L97 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Knn.ts#L94-L97 type TextEmbedding struct { ModelId string `json:"model_id"` ModelText string `json:"model_text"` @@ -88,8 +88,6 @@ func NewTextEmbedding() *TextEmbedding { return r } -// true - type TextEmbeddingVariant interface { TextEmbeddingCaster() *TextEmbedding } diff --git a/typedapi/types/textembeddingbyteresult.go b/typedapi/types/textembeddingbyteresult.go index b1fac7c019..620c23b941 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TextEmbeddingByteResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/Results.ts#L53-L58 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 cb0bf34d9d..f155c9b2de 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TextEmbeddingInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L252-L262 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -108,8 +108,6 @@ func NewTextEmbeddingInferenceOptions() *TextEmbeddingInferenceOptions { return r } -// true - type TextEmbeddingInferenceOptionsVariant interface { TextEmbeddingInferenceOptionsCaster() *TextEmbeddingInferenceOptions } diff --git a/typedapi/types/textembeddinginferenceupdateoptions.go b/typedapi/types/textembeddinginferenceupdateoptions.go index 96cbe8333d..819b5041e6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TextEmbeddingInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L411-L415 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -83,8 +83,6 @@ func NewTextEmbeddingInferenceUpdateOptions() *TextEmbeddingInferenceUpdateOptio return r } -// true - type TextEmbeddingInferenceUpdateOptionsVariant interface { TextEmbeddingInferenceUpdateOptionsCaster() *TextEmbeddingInferenceUpdateOptions } diff --git a/typedapi/types/textembeddingresult.go b/typedapi/types/textembeddingresult.go index b42c3bbf83..79f3f430e6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TextEmbeddingResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/Results.ts#L60-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 76d8d6262b..61636ef875 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TextExpansionInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L264-L271 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -90,8 +90,6 @@ func NewTextExpansionInferenceOptions() *TextExpansionInferenceOptions { return r } -// true - type TextExpansionInferenceOptionsVariant interface { TextExpansionInferenceOptionsCaster() *TextExpansionInferenceOptions } diff --git a/typedapi/types/textexpansioninferenceupdateoptions.go b/typedapi/types/textexpansioninferenceupdateoptions.go index e6032268f8..d5aaeb36e8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TextExpansionInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L417-L421 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -83,8 +83,6 @@ func NewTextExpansionInferenceUpdateOptions() *TextExpansionInferenceUpdateOptio return r } -// true - type TextExpansionInferenceUpdateOptionsVariant interface { TextExpansionInferenceUpdateOptionsCaster() *TextExpansionInferenceUpdateOptions } diff --git a/typedapi/types/textexpansionquery.go b/typedapi/types/textexpansionquery.go index 22ed890dca..69e3e18e81 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TextExpansionQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/TextExpansionQuery.ts#L23-L36 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -132,8 +132,6 @@ func NewTextExpansionQuery() *TextExpansionQuery { return r } -// true - type TextExpansionQueryVariant interface { TextExpansionQueryCaster() *TextExpansionQuery } diff --git a/typedapi/types/textindexprefixes.go b/typedapi/types/textindexprefixes.go index 9aa392d18b..655c595217 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TextIndexPrefixes type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L298-L301 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L316-L319 type TextIndexPrefixes struct { MaxChars int `json:"max_chars"` MinChars int `json:"min_chars"` @@ -96,8 +96,6 @@ func NewTextIndexPrefixes() *TextIndexPrefixes { return r } -// true - type TextIndexPrefixesVariant interface { TextIndexPrefixesCaster() *TextIndexPrefixes } diff --git a/typedapi/types/textproperty.go b/typedapi/types/textproperty.go index e7ab45c343..170164ac45 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // TextProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L303-L320 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L321-L338 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 { @@ -1032,8 +1044,6 @@ func NewTextProperty() *TextProperty { return r } -// true - type TextPropertyVariant interface { TextPropertyCaster() *TextProperty } @@ -1041,3 +1051,8 @@ type TextPropertyVariant interface { func (s *TextProperty) TextPropertyCaster() *TextProperty { return s } + +func (s *TextProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/textsimilarityreranker.go b/typedapi/types/textsimilarityreranker.go index 1eb24a067b..b1fb0f28f0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,20 +31,22 @@ import ( // TextSimilarityReranker type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Retriever.ts#L93-L104 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -169,8 +183,6 @@ func NewTextSimilarityReranker() *TextSimilarityReranker { return r } -// true - type TextSimilarityRerankerVariant interface { TextSimilarityRerankerCaster() *TextSimilarityReranker } diff --git a/typedapi/types/texttoanalyze.go b/typedapi/types/texttoanalyze.go index 7ec387a3ae..e188a85c65 100644 --- a/typedapi/types/texttoanalyze.go +++ b/typedapi/types/texttoanalyze.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TextToAnalyze type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/analyze/types.ts#L69-L69 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/analyze/types.ts#L69-L69 type TextToAnalyze []string type TextToAnalyzeVariant interface { diff --git a/typedapi/types/thaianalyzer.go b/typedapi/types/thaianalyzer.go index 10d395dacb..f1975da3ec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,11 +31,11 @@ import ( // ThaiAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L317-L321 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L317-L321 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": @@ -112,8 +101,6 @@ func NewThaiAnalyzer() *ThaiAnalyzer { return r } -// true - type ThaiAnalyzerVariant interface { ThaiAnalyzerCaster() *ThaiAnalyzer } @@ -121,3 +108,8 @@ type ThaiAnalyzerVariant interface { func (s *ThaiAnalyzer) ThaiAnalyzerCaster() *ThaiAnalyzer { return s } + +func (s *ThaiAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/thaitokenizer.go b/typedapi/types/thaitokenizer.go index 22269884b7..797a494bfa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // ThaiTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L126-L128 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L128-L130 type ThaiTokenizer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -86,8 +86,6 @@ func NewThaiTokenizer() *ThaiTokenizer { return r } -// true - type ThaiTokenizerVariant interface { ThaiTokenizerCaster() *ThaiTokenizer } @@ -95,3 +93,8 @@ type ThaiTokenizerVariant interface { func (s *ThaiTokenizer) ThaiTokenizerCaster() *ThaiTokenizer { return s } + +func (s *ThaiTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/threadcount.go b/typedapi/types/threadcount.go index d09f3cbfbc..b99578bb48 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ThreadCount type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L1075-L1100 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6b4cbb5821..0843529f38 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ThreadPoolRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/thread_pool/types.ts#L22-L124 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e6b7dd4edf..ab878a2c23 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ThrottleState type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Action.ts#L120-L123 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L120-L123 type ThrottleState struct { Reason string `json:"reason"` Timestamp DateTime `json:"timestamp"` @@ -81,8 +81,6 @@ func NewThrottleState() *ThrottleState { return r } -// true - type ThrottleStateVariant interface { ThrottleStateCaster() *ThrottleState } diff --git a/typedapi/types/timehttphistogram.go b/typedapi/types/timehttphistogram.go index 99e2c2c0ff..a6ba9a5cd9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TimeHttpHistogram type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L708-L712 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 aa93015e02..c57fd1c7b4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TimeOfMonth type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Schedule.ts#L111-L114 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L111-L114 type TimeOfMonth struct { At []string `json:"at"` On []int `json:"on"` @@ -35,8 +35,6 @@ func NewTimeOfMonth() *TimeOfMonth { return r } -// true - type TimeOfMonthVariant interface { TimeOfMonthCaster() *TimeOfMonth } diff --git a/typedapi/types/timeofweek.go b/typedapi/types/timeofweek.go index 5fea25aec0..55a2f5288e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // TimeOfWeek type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Schedule.ts#L116-L119 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L116-L119 type TimeOfWeek struct { At []string `json:"at"` On []day.Day `json:"on"` @@ -39,8 +39,6 @@ func NewTimeOfWeek() *TimeOfWeek { return r } -// true - type TimeOfWeekVariant interface { TimeOfWeekCaster() *TimeOfWeek } diff --git a/typedapi/types/timeofyear.go b/typedapi/types/timeofyear.go index 4a1361ee74..d9a7b08a4e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // TimeOfYear type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Schedule.ts#L121-L125 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Schedule.ts#L121-L125 type TimeOfYear struct { At []string `json:"at"` Int []month.Month `json:"int"` @@ -40,8 +40,6 @@ func NewTimeOfYear() *TimeOfYear { return r } -// true - type TimeOfYearVariant interface { TimeOfYearCaster() *TimeOfYear } diff --git a/typedapi/types/timeseriesaggregate.go b/typedapi/types/timeseriesaggregate.go index 408eebc67f..54e1554da8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TimeSeriesAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L730-L731 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5196296b8c..7baa19429a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TimeSeriesAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1033-L1046 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -97,8 +97,6 @@ func NewTimeSeriesAggregation() *TimeSeriesAggregation { return r } -// true - type TimeSeriesAggregationVariant interface { TimeSeriesAggregationCaster() *TimeSeriesAggregation } diff --git a/typedapi/types/timeseriesbucket.go b/typedapi/types/timeseriesbucket.go index 2d52c241c3..27e2ce3f29 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // TimeSeriesBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L733-L735 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 444e0d7c7b..28f27b779e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TimeSync type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/_types/Transform.ts#L177-L189 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -79,8 +79,6 @@ func NewTimeSync() *TimeSync { return r } -// true - type TimeSyncVariant interface { TimeSyncCaster() *TimeSync } diff --git a/typedapi/types/timingstats.go b/typedapi/types/timingstats.go index 76a15fce92..559d3821c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TimingStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L564-L569 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4f26611789..aae1a4f44e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // TokenCountProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/specialized.ts#L94-L101 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -928,8 +940,6 @@ func NewTokenCountProperty() *TokenCountProperty { return r } -// true - type TokenCountPropertyVariant interface { TokenCountPropertyCaster() *TokenCountProperty } @@ -937,3 +947,8 @@ type TokenCountPropertyVariant interface { func (s *TokenCountProperty) TokenCountPropertyCaster() *TokenCountProperty { return s } + +func (s *TokenCountProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/tokendetail.go b/typedapi/types/tokendetail.go index 5b0a11e24f..5e44c76569 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TokenDetail type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/analyze/types.ts#L71-L74 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 252d077640..9e8915dfe6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // TokenFilterDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L345-L350 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L575-L580 type TokenFilter any type TokenFilterVariant interface { diff --git a/typedapi/types/tokenfilterdefinition.go b/typedapi/types/tokenfilterdefinition.go index dfd5f4b6af..814aff1e68 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e 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,7 +97,7 @@ package types // PhoneticTokenFilter // DictionaryDecompounderTokenFilter // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L352-L404 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L582-L660 type TokenFilterDefinition any type TokenFilterDefinitionVariant interface { diff --git a/typedapi/types/tokenizationconfigcontainer.go b/typedapi/types/tokenizationconfigcontainer.go index a9ed3676ea..297ff86220 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // TokenizationConfigContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L135-L158 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L135-L158 type TokenizationConfigContainer struct { AdditionalTokenizationConfigContainerProperty map[string]json.RawMessage `json:"-"` // Bert Indicates BERT tokenization and its options @@ -79,8 +79,6 @@ func NewTokenizationConfigContainer() *TokenizationConfigContainer { return r } -// true - type TokenizationConfigContainerVariant interface { TokenizationConfigContainerCaster() *TokenizationConfigContainer } diff --git a/typedapi/types/tokenizer.go b/typedapi/types/tokenizer.go index 21cbbe91cf..9cb06aa191 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // string // TokenizerDefinition // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L140-L145 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L142-L147 type Tokenizer any type TokenizerVariant interface { diff --git a/typedapi/types/tokenizerdefinition.go b/typedapi/types/tokenizerdefinition.go index 7ce9f09541..9d7f64d608 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -41,7 +41,7 @@ package types // KuromojiTokenizer // NoriTokenizer // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L147-L170 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L149-L172 type TokenizerDefinition any type TokenizerDefinitionVariant interface { diff --git a/typedapi/types/tokenpruningconfig.go b/typedapi/types/tokenpruningconfig.go index 1ac7d29589..370b6d1349 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TokenPruningConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/TokenPruningConfig.ts#L22-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -117,8 +117,6 @@ func NewTokenPruningConfig() *TokenPruningConfig { return r } -// true - type TokenPruningConfigVariant interface { TokenPruningConfigCaster() *TokenPruningConfig } diff --git a/typedapi/types/toolcall.go b/typedapi/types/toolcall.go index b56ac6894c..a5a11bffec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ToolCall type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L112-L128 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L151-L167 type ToolCall struct { // Function The function that the model called. Function ToolCallFunction `json:"function"` @@ -90,8 +90,6 @@ func NewToolCall() *ToolCall { return r } -// true - type ToolCallVariant interface { ToolCallCaster() *ToolCall } diff --git a/typedapi/types/toolcallfunction.go b/typedapi/types/toolcallfunction.go index 515b590017..43c30aa684 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ToolCallFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L98-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -90,8 +90,6 @@ func NewToolCallFunction() *ToolCallFunction { return r } -// true - type ToolCallFunctionVariant interface { ToolCallFunctionCaster() *ToolCallFunction } diff --git a/typedapi/types/topclassentry.go b/typedapi/types/topclassentry.go index 2acc7a5048..32ee507ae6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TopClassEntry type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L459-L463 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9c77b050d5..cf7962bc43 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TopHit type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/text_structure/_types/Structure.ts#L35-L38 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bcbeaed0e8..8840bffd67 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TopHitsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L747-L753 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 7ffb60f165..145371089d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TopHitsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L346-L406 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -297,8 +297,6 @@ func NewTopHitsAggregation() *TopHitsAggregation { return r } -// true - type TopHitsAggregationVariant interface { TopHitsAggregationCaster() *TopHitsAggregation } diff --git a/typedapi/types/topleftbottomrightgeobounds.go b/typedapi/types/topleftbottomrightgeobounds.go index b67a923114..b077b9bdae 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TopLeftBottomRightGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L161-L164 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L161-L164 type TopLeftBottomRightGeoBounds struct { BottomRight GeoLocation `json:"bottom_right"` TopLeft GeoLocation `json:"top_left"` @@ -153,8 +153,6 @@ func NewTopLeftBottomRightGeoBounds() *TopLeftBottomRightGeoBounds { return r } -// true - type TopLeftBottomRightGeoBoundsVariant interface { TopLeftBottomRightGeoBoundsCaster() *TopLeftBottomRightGeoBounds } @@ -162,3 +160,8 @@ type TopLeftBottomRightGeoBoundsVariant interface { func (s *TopLeftBottomRightGeoBounds) TopLeftBottomRightGeoBoundsCaster() *TopLeftBottomRightGeoBounds { return s } + +func (s *TopLeftBottomRightGeoBounds) GeoBoundsCaster() *GeoBounds { + o := GeoBounds(s) + return &o +} diff --git a/typedapi/types/topmetrics.go b/typedapi/types/topmetrics.go index 8fb99b110c..e319e0c36f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TopMetrics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L832-L836 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3314cdccfc..8f0e3348b5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TopMetricsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L827-L830 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 68818ba887..2d82e122f5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TopMetricsAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L408-L425 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L431-L448 type TopMetricsAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -137,8 +137,6 @@ func NewTopMetricsAggregation() *TopMetricsAggregation { return r } -// true - type TopMetricsAggregationVariant interface { TopMetricsAggregationCaster() *TopMetricsAggregation } diff --git a/typedapi/types/topmetricsvalue.go b/typedapi/types/topmetricsvalue.go index 68052df2c6..9ea22ed11a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TopMetricsValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L427-L432 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L450-L455 type TopMetricsValue struct { // Field A field to return as a metric. Field string `json:"field"` @@ -68,8 +68,6 @@ func NewTopMetricsValue() *TopMetricsValue { return r } -// true - type TopMetricsValueVariant interface { TopMetricsValueCaster() *TopMetricsValue } diff --git a/typedapi/types/toprightbottomleftgeobounds.go b/typedapi/types/toprightbottomleftgeobounds.go index fbe9074e0a..3e2b08e230 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TopRightBottomLeftGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L166-L169 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L166-L169 type TopRightBottomLeftGeoBounds struct { BottomLeft GeoLocation `json:"bottom_left"` TopRight GeoLocation `json:"top_right"` @@ -153,8 +153,6 @@ func NewTopRightBottomLeftGeoBounds() *TopRightBottomLeftGeoBounds { return r } -// true - type TopRightBottomLeftGeoBoundsVariant interface { TopRightBottomLeftGeoBoundsCaster() *TopRightBottomLeftGeoBounds } @@ -162,3 +160,8 @@ type TopRightBottomLeftGeoBoundsVariant interface { func (s *TopRightBottomLeftGeoBounds) TopRightBottomLeftGeoBoundsCaster() *TopRightBottomLeftGeoBounds { return s } + +func (s *TopRightBottomLeftGeoBounds) GeoBoundsCaster() *GeoBounds { + o := GeoBounds(s) + return &o +} diff --git a/typedapi/types/totalfeatureimportance.go b/typedapi/types/totalfeatureimportance.go index 08558f2b72..a9faccab88 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TotalFeatureImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L290-L297 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 17935b854f..f9230cf14d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TotalFeatureImportanceClass type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L299-L304 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0ea0d4382a..dc684af0bd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TotalFeatureImportanceStatistics type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L306-L313 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e4c4e7ce0d..1bfee52934 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TotalUserProfiles type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/suggest_user_profiles/Response.ts#L24-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 173e8a9879..f999c28dbc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,7 +25,7 @@ package types // bool // int // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/search/_types/hits.ts#L143-L151 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/search/_types/hits.ts#L143-L151 type TrackHits any type TrackHitsVariant interface { diff --git a/typedapi/types/trainedmodel.go b/typedapi/types/trainedmodel.go index 9668e2581a..aa3f89d17f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TrainedModel type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/types.ts#L60-L72 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L60-L72 type TrainedModel struct { // Ensemble The definition for an ensemble model Ensemble *Ensemble `json:"ensemble,omitempty"` @@ -43,8 +43,6 @@ func NewTrainedModel() *TrainedModel { return r } -// true - type TrainedModelVariant interface { TrainedModelCaster() *TrainedModel } diff --git a/typedapi/types/trainedmodelassignment.go b/typedapi/types/trainedmodelassignment.go index 00661c48db..6e0a485361 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // TrainedModelAssignment type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L472-L489 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 749c0913b8..765cb3d37f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // TrainedModelAssignmentRoutingStateAndReason type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L431-L441 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 42b8d3ba00..fb5c9e7b15 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // TrainedModelAssignmentRoutingTable type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L443-L461 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c42e4e9191..534bb20cc6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // TrainedModelAssignmentTaskParameters type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L370-L406 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 299302e942..5d4c8bb2e6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // TrainedModelConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L203-L240 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ef4b569167..f87e75aba2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TrainedModelConfigInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L242-L245 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6b8fb9c1f9..534e412a5b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TrainedModelConfigMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L247-L255 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 838b23d95a..838e1ce946 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // TrainedModelDeploymentAllocationStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L463-L470 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 411fb91b2e..432205160e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TrainedModelDeploymentNodesStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L156-L201 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 24d8bcefb4..4d9495c03a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // TrainedModelDeploymentStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L62-L107 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e6d1da80e3..82a3e508c8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TrainedModelEntities type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L452-L458 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4c67bdbfcb..1637f0afeb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TrainedModelInferenceClassImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L465-L468 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ecd1a4797d..a2fd6d071f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TrainedModelInferenceFeatureImportance type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L470-L474 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 befc67e378..0208e9a23d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TrainedModelInferenceStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L127-L147 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bfa32bbbfd..6594740f41 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TrainedModelLocation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L491-L493 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bbf3c52659..3a24f363df 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TrainedModelLocationIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L495-L497 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 354444d980..4626020851 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TrainedModelPrefixStrings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L499-L508 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/TrainedModel.ts#L499-L508 type TrainedModelPrefixStrings struct { // Ingest String prepended to input at ingest Ingest *string `json:"ingest,omitempty"` @@ -90,8 +90,6 @@ func NewTrainedModelPrefixStrings() *TrainedModelPrefixStrings { return r } -// true - type TrainedModelPrefixStringsVariant interface { TrainedModelPrefixStringsCaster() *TrainedModelPrefixStrings } diff --git a/typedapi/types/trainedmodelsizestats.go b/typedapi/types/trainedmodelsizestats.go index 25034d8eb9..94ba3bf55c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TrainedModelSizeStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L149-L154 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 92e97f8cd8..8aae50703e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TrainedModelsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/ml_trained_models/types.ts#L23-L115 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d66dc353b9..557a4a98aa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TrainedModelStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/TrainedModel.ts#L42-L60 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 2bfe18cb71..f2a2113edc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TrainedModelTree type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/types.ts#L74-L79 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L74-L79 type TrainedModelTree struct { ClassificationLabels []string `json:"classification_labels,omitempty"` FeatureNames []string `json:"feature_names"` @@ -93,8 +93,6 @@ func NewTrainedModelTree() *TrainedModelTree { return r } -// true - type TrainedModelTreeVariant interface { TrainedModelTreeCaster() *TrainedModelTree } diff --git a/typedapi/types/trainedmodeltreenode.go b/typedapi/types/trainedmodeltreenode.go index 77ce4b071e..d9bd301b42 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TrainedModelTreeNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/types.ts#L81-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L81-L91 type TrainedModelTreeNode struct { DecisionType *string `json:"decision_type,omitempty"` DefaultLeft *bool `json:"default_left,omitempty"` @@ -209,8 +209,6 @@ func NewTrainedModelTreeNode() *TrainedModelTreeNode { return r } -// true - type TrainedModelTreeNodeVariant interface { TrainedModelTreeNodeCaster() *TrainedModelTreeNode } diff --git a/typedapi/types/transformauthorization.go b/typedapi/types/transformauthorization.go index eb55121df2..ba6baf11bb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TransformAuthorization type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/Authorization.ts#L59-L71 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3fd5ce96ba..c3e422e4b3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // TransformContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Transform.ts#L28-L35 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Transform.ts#L28-L35 type TransformContainer struct { AdditionalTransformContainerProperty map[string]json.RawMessage `json:"-"` Chain []TransformContainer `json:"chain,omitempty"` @@ -73,8 +73,6 @@ func NewTransformContainer() *TransformContainer { return r } -// true - type TransformContainerVariant interface { TransformContainerCaster() *TransformContainer } diff --git a/typedapi/types/transformdestination.go b/typedapi/types/transformdestination.go index 1c4c4eaff6..584ead9a7d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TransformDestination type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/_types/Transform.ts#L34-L45 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -87,8 +87,6 @@ func NewTransformDestination() *TransformDestination { return r } -// true - type TransformDestinationVariant interface { TransformDestinationCaster() *TransformDestination } diff --git a/typedapi/types/transformhealthissue.go b/typedapi/types/transformhealthissue.go index 0b050f62f5..9529afd97f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TransformHealthIssue type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/get_transform_stats/types.ts#L51-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eb077b425e..1b711ebdd7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TransformIndexerStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/get_transform_stats/types.ts#L73-L91 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b27657ceb5..2b150a4e90 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TransformProgress type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/get_transform_stats/types.ts#L65-L71 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bb08615b97..de13cdbf41 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TransformSource type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/_types/Transform.ts#L146-L165 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -102,8 +102,6 @@ func NewTransformSource() *TransformSource { return r } -// true - type TransformSourceVariant interface { TransformSourceCaster() *TransformSource } diff --git a/typedapi/types/transformsrecord.go b/typedapi/types/transformsrecord.go index c707a04084..9e52e8dd88 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TransformsRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cat/transforms/types.ts#L22-L197 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e963749d9a..2ad58c4ef6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TransformStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/get_transform_stats/types.ts#L31-L42 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 0c5aac5635..b8b93e71e0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // TransformStatsHealth type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/get_transform_stats/types.ts#L44-L49 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9725382e35..091ed2a678 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TransformSummary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/transform/get_transform/types.ts#L33-L62 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9a41ae2134..a630c6f9d6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // Translog type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L355-L377 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L368-L390 type Translog struct { // Durability Whether or not to `fsync` and commit the translog after every index, delete, // update, or bulk request. @@ -102,8 +102,6 @@ func NewTranslog() *Translog { return r } -// true - type TranslogVariant interface { TranslogCaster() *Translog } diff --git a/typedapi/types/translogretention.go b/typedapi/types/translogretention.go index 9cd2faeebb..0f662c9b4a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TranslogRetention type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/_types/IndexSettings.ts#L396-L415 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/_types/IndexSettings.ts#L409-L428 type TranslogRetention struct { // Age This controls the maximum duration for which translog files are kept by each // shard. Keeping more @@ -91,8 +91,6 @@ func NewTranslogRetention() *TranslogRetention { return r } -// true - type TranslogRetentionVariant interface { TranslogRetentionCaster() *TranslogRetention } diff --git a/typedapi/types/translogstats.go b/typedapi/types/translogstats.go index e4d7337c72..bcf3894cf4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TranslogStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L402-L410 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L427-L435 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 16b656f606..c8d57a4f7b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TranslogStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/recovery/types.ts#L102-L109 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 08580d2a70..d7f969082e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Transport type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L1118-L1161 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3ae9b3e83d..5aa5e540e6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TransportHistogram type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/nodes/_types/Stats.ts#L1163-L1177 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9399772932..dcb7241f7a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // TriggerContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Trigger.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Trigger.ts#L23-L28 type TriggerContainer struct { AdditionalTriggerContainerProperty map[string]json.RawMessage `json:"-"` Schedule *ScheduleContainer `json:"schedule,omitempty"` @@ -71,8 +71,6 @@ func NewTriggerContainer() *TriggerContainer { return r } -// true - type TriggerContainerVariant interface { TriggerContainerCaster() *TriggerContainer } diff --git a/typedapi/types/triggereventcontainer.go b/typedapi/types/triggereventcontainer.go index 656aee0b49..ac8a2f5098 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // TriggerEventContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Trigger.ts#L32-L37 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 736c3484d7..f9ee7dc69c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TriggerEventResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Trigger.ts#L39-L43 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 78b3a2c1d0..8fcd14dcb8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TrimProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1544-L1560 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1544-L1560 type TrimProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -154,8 +154,6 @@ func NewTrimProcessor() *TrimProcessor { return r } -// true - type TrimProcessorVariant interface { TrimProcessorCaster() *TrimProcessor } diff --git a/typedapi/types/trimtokenfilter.go b/typedapi/types/trimtokenfilter.go index 710aad33c8..fabae2b594 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // TrimTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L327-L329 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L431-L433 type TrimTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -86,8 +86,6 @@ func NewTrimTokenFilter() *TrimTokenFilter { return r } -// true - type TrimTokenFilterVariant interface { TrimTokenFilterCaster() *TrimTokenFilter } @@ -95,3 +93,8 @@ type TrimTokenFilterVariant interface { func (s *TrimTokenFilter) TrimTokenFilterCaster() *TrimTokenFilter { return s } + +func (s *TrimTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/truncatetokenfilter.go b/typedapi/types/truncatetokenfilter.go index 611401a44c..a529f10462 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,8 +31,10 @@ import ( // TruncateTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L331-L334 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -105,8 +107,6 @@ func NewTruncateTokenFilter() *TruncateTokenFilter { return r } -// true - type TruncateTokenFilterVariant interface { TruncateTokenFilterCaster() *TruncateTokenFilter } @@ -114,3 +114,8 @@ type TruncateTokenFilterVariant interface { func (s *TruncateTokenFilter) TruncateTokenFilterCaster() *TruncateTokenFilter { return s } + +func (s *TruncateTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/ttestaggregate.go b/typedapi/types/ttestaggregate.go index ec721a54b3..63b49e86e7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TTestAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L838-L845 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1753bc1b7b..055336644d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -26,7 +26,7 @@ import ( // TTestAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L303-L317 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L326-L340 type TTestAggregation struct { // A Test population A. A *TestPopulation `json:"a,omitempty"` @@ -43,8 +43,6 @@ func NewTTestAggregation() *TTestAggregation { return r } -// true - type TTestAggregationVariant interface { TTestAggregationCaster() *TTestAggregation } diff --git a/typedapi/types/turkishanalyzer.go b/typedapi/types/turkishanalyzer.go index 4b912e94ee..e7dedf0e2a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,12 +31,12 @@ import ( // TurkishAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L310-L315 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L310-L315 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": @@ -119,8 +108,6 @@ func NewTurkishAnalyzer() *TurkishAnalyzer { return r } -// true - type TurkishAnalyzerVariant interface { TurkishAnalyzerCaster() *TurkishAnalyzer } @@ -128,3 +115,8 @@ type TurkishAnalyzerVariant interface { func (s *TurkishAnalyzer) TurkishAnalyzerCaster() *TurkishAnalyzer { return s } + +func (s *TurkishAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/typefieldmappings.go b/typedapi/types/typefieldmappings.go index 34650afd98..688c03c510 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // TypeFieldMappings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/get_field_mapping/types.ts#L24-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 011b9918d0..125cd22351 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // TypeMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/TypeMapping.ts#L34-L57 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -526,8 +532,6 @@ func NewTypeMapping() *TypeMapping { return r } -// true - type TypeMappingVariant interface { TypeMappingCaster() *TypeMapping } diff --git a/typedapi/types/typequery.go b/typedapi/types/typequery.go index f28cd7f04f..c1dd9a85bb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // TypeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L301-L303 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L297-L299 type TypeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -110,8 +110,6 @@ func NewTypeQuery() *TypeQuery { return r } -// true - type TypeQueryVariant interface { TypeQueryCaster() *TypeQuery } diff --git a/typedapi/types/uaxemailurltokenizer.go b/typedapi/types/uaxemailurltokenizer.go index f38f0e1ed8..d6fa6ca6d2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UaxEmailUrlTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L130-L133 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L132-L135 type UaxEmailUrlTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` @@ -105,8 +105,6 @@ func NewUaxEmailUrlTokenizer() *UaxEmailUrlTokenizer { return r } -// true - type UaxEmailUrlTokenizerVariant interface { UaxEmailUrlTokenizerCaster() *UaxEmailUrlTokenizer } @@ -114,3 +112,8 @@ type UaxEmailUrlTokenizerVariant interface { func (s *UaxEmailUrlTokenizer) UaxEmailUrlTokenizerCaster() *UaxEmailUrlTokenizer { return s } + +func (s *UaxEmailUrlTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/unassignedinformation.go b/typedapi/types/unassignedinformation.go index 1971f23f68..e87c91dcc2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // UnassignedInformation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/allocation_explain/types.ts#L128-L136 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9a6dc273f0..0d162b7cf9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,8 +31,10 @@ import ( // UniqueTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L336-L339 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -103,8 +105,6 @@ func NewUniqueTokenFilter() *UniqueTokenFilter { return r } -// true - type UniqueTokenFilterVariant interface { UniqueTokenFilterCaster() *UniqueTokenFilter } @@ -112,3 +112,8 @@ type UniqueTokenFilterVariant interface { func (s *UniqueTokenFilter) UniqueTokenFilterCaster() *UniqueTokenFilter { return s } + +func (s *UniqueTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/unmappedraretermsaggregate.go b/typedapi/types/unmappedraretermsaggregate.go index c50d84b15c..6ceb324cb8 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // UnmappedRareTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L493-L499 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 23622fcf77..60dee067ff 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // UnmappedSamplerAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L561-L562 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9d98b4bfd9..ca9c92805c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UnmappedSignificantTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L690-L696 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9bf0a362c4..7e1178ee5a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UnmappedTermsAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L463-L469 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c79d920f08..9e8903c623 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // UnratedDocument type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/rank_eval/types.ts#L150-L153 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 ed14bb6301..2ad058ebe0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -36,7 +36,7 @@ import ( // UnsignedLongNumberProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L191-L194 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L192-L195 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 { @@ -962,8 +974,6 @@ func NewUnsignedLongNumberProperty() *UnsignedLongNumberProperty { return r } -// true - type UnsignedLongNumberPropertyVariant interface { UnsignedLongNumberPropertyCaster() *UnsignedLongNumberProperty } @@ -971,3 +981,8 @@ type UnsignedLongNumberPropertyVariant interface { func (s *UnsignedLongNumberProperty) UnsignedLongNumberPropertyCaster() *UnsignedLongNumberProperty { return s } + +func (s *UnsignedLongNumberProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/untypeddecayfunction.go b/typedapi/types/untypeddecayfunction.go index 519233918b..e73dc384ab 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,7 +29,7 @@ import ( // UntypedDecayFunction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/compound.ts#L204-L207 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -75,8 +75,6 @@ func NewUntypedDecayFunction() *UntypedDecayFunction { return r } -// true - type UntypedDecayFunctionVariant interface { UntypedDecayFunctionCaster() *UntypedDecayFunction } @@ -84,3 +82,8 @@ type UntypedDecayFunctionVariant interface { func (s *UntypedDecayFunction) UntypedDecayFunctionCaster() *UntypedDecayFunction { return s } + +func (s *UntypedDecayFunction) DecayFunctionCaster() *DecayFunction { + o := DecayFunction(s) + return &o +} diff --git a/typedapi/types/untypeddistancefeaturequery.go b/typedapi/types/untypeddistancefeaturequery.go index ae84e5b635..0ab1a293bf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UntypedDistanceFeatureQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/specialized.ts#L61-L64 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -132,8 +132,6 @@ func NewUntypedDistanceFeatureQuery() *UntypedDistanceFeatureQuery { return r } -// true - type UntypedDistanceFeatureQueryVariant interface { UntypedDistanceFeatureQueryCaster() *UntypedDistanceFeatureQuery } @@ -141,3 +139,8 @@ type UntypedDistanceFeatureQueryVariant interface { func (s *UntypedDistanceFeatureQuery) UntypedDistanceFeatureQueryCaster() *UntypedDistanceFeatureQuery { return s } + +func (s *UntypedDistanceFeatureQuery) DistanceFeatureQueryCaster() *DistanceFeatureQuery { + o := DistanceFeatureQuery(s) + return &o +} diff --git a/typedapi/types/untypedrangequery.go b/typedapi/types/untypedrangequery.go index 560b9aa908..76ed13ed56 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // UntypedRangeQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L150-L159 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L146-L155 type UntypedRangeQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -42,8 +42,7 @@ type UntypedRangeQuery struct { // A value greater than 1.0 increases the relevance score. Boost *float32 `json:"boost,omitempty"` // Format Date format used to convert `date` values in the query. - Format *string `json:"format,omitempty"` - From *json.RawMessage `json:"from,omitempty"` + Format *string `json:"format,omitempty"` // Gt Greater than. Gt json.RawMessage `json:"gt,omitempty"` // Gte Greater than or equal to. @@ -57,8 +56,7 @@ type UntypedRangeQuery struct { Relation *rangerelation.RangeRelation `json:"relation,omitempty"` // TimeZone Coordinated Universal Time (UTC) offset or IANA time zone used to convert // `date` values in the query to UTC. - TimeZone *string `json:"time_zone,omitempty"` - To *json.RawMessage `json:"to,omitempty"` + TimeZone *string `json:"time_zone,omitempty"` } func (s *UntypedRangeQuery) UnmarshalJSON(data []byte) error { @@ -97,11 +95,6 @@ func (s *UntypedRangeQuery) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "Format", err) } - case "from": - if err := dec.Decode(&s.From); err != nil { - return fmt.Errorf("%s | %w", "From", err) - } - case "gt": if err := dec.Decode(&s.Gt); err != nil { return fmt.Errorf("%s | %w", "Gt", err) @@ -144,11 +137,6 @@ func (s *UntypedRangeQuery) UnmarshalJSON(data []byte) error { return fmt.Errorf("%s | %w", "TimeZone", err) } - case "to": - if err := dec.Decode(&s.To); err != nil { - return fmt.Errorf("%s | %w", "To", err) - } - } } return nil @@ -161,8 +149,6 @@ func NewUntypedRangeQuery() *UntypedRangeQuery { return r } -// true - type UntypedRangeQueryVariant interface { UntypedRangeQueryCaster() *UntypedRangeQuery } @@ -170,3 +156,8 @@ type UntypedRangeQueryVariant interface { func (s *UntypedRangeQuery) UntypedRangeQueryCaster() *UntypedRangeQuery { return s } + +func (s *UntypedRangeQuery) RangeQueryCaster() *RangeQuery { + o := RangeQuery(s) + return &o +} diff --git a/typedapi/types/updateaction.go b/typedapi/types/updateaction.go index be1a11e5d5..6eab7a6de1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UpdateAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/bulk/types.ts#L182-L217 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -174,8 +174,6 @@ func NewUpdateAction() *UpdateAction { return r } -// true - type UpdateActionVariant interface { UpdateActionCaster() *UpdateAction } diff --git a/typedapi/types/updatebyqueryrethrottlenode.go b/typedapi/types/updatebyqueryrethrottlenode.go index 40cd1bd6c0..682fd7dafe 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // UpdateByQueryRethrottleNode type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/update_by_query_rethrottle/UpdateByQueryRethrottleNode.ts#L25-L27 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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/updateddatastreamsettings.go b/typedapi/types/updateddatastreamsettings.go new file mode 100644 index 0000000000..ad6e3f5ef5 --- /dev/null +++ b/typedapi/types/updateddatastreamsettings.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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" +) + +// UpdatedDataStreamSettings type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/put_data_stream_settings/IndicesPutDataStreamSettingsResponse.ts#L30-L55 +type UpdatedDataStreamSettings struct { + // AppliedToDataStream If the settings were successfully applied to the data stream (or would have + // been, if running in `dry_run` + // mode), it is `true`. If an error occurred, it is `false`. + AppliedToDataStream bool `json:"applied_to_data_stream"` + // EffectiveSettings The settings that are effective on this data stream, taking into account the + // settings from the matching index + // template and the settings specific to this data stream. + EffectiveSettings IndexSettings `json:"effective_settings"` + // Error A message explaining why the settings could not be applied to the data + // stream. + Error *string `json:"error,omitempty"` + // IndexSettingsResults Information about whether and where each setting was applied. + IndexSettingsResults IndexSettingResults `json:"index_settings_results"` + // Name The data stream name. + Name string `json:"name"` + // Settings The settings that are specfic to this data stream that will override any + // settings from the matching index template. + Settings IndexSettings `json:"settings"` +} + +func (s *UpdatedDataStreamSettings) 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 "applied_to_data_stream": + 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", "AppliedToDataStream", err) + } + s.AppliedToDataStream = value + case bool: + s.AppliedToDataStream = v + } + + case "effective_settings": + if err := dec.Decode(&s.EffectiveSettings); err != nil { + return fmt.Errorf("%s | %w", "EffectiveSettings", err) + } + + 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 "index_settings_results": + if err := dec.Decode(&s.IndexSettingsResults); err != nil { + return fmt.Errorf("%s | %w", "IndexSettingsResults", err) + } + + case "name": + if err := dec.Decode(&s.Name); err != nil { + return fmt.Errorf("%s | %w", "Name", err) + } + + case "settings": + if err := dec.Decode(&s.Settings); err != nil { + return fmt.Errorf("%s | %w", "Settings", err) + } + + } + } + return nil +} + +// NewUpdatedDataStreamSettings returns a UpdatedDataStreamSettings. +func NewUpdatedDataStreamSettings() *UpdatedDataStreamSettings { + r := &UpdatedDataStreamSettings{} + + return r +} diff --git a/typedapi/types/updateoperation.go b/typedapi/types/updateoperation.go index bb110f4b40..de6661a1e7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // UpdateOperation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_global/bulk/types.ts#L146-L156 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_global/bulk/types.ts#L146-L156 type UpdateOperation struct { // Id_ The document ID. Id_ *string `json:"_id,omitempty"` @@ -154,8 +154,6 @@ func NewUpdateOperation() *UpdateOperation { return r } -// true - type UpdateOperationVariant interface { UpdateOperationCaster() *UpdateOperation } diff --git a/typedapi/types/uppercaseprocessor.go b/typedapi/types/uppercaseprocessor.go index 515b8863a3..f613b69fb3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UppercaseProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1562-L1578 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1562-L1578 type UppercaseProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -154,8 +154,6 @@ func NewUppercaseProcessor() *UppercaseProcessor { return r } -// true - type UppercaseProcessorVariant interface { UppercaseProcessorCaster() *UppercaseProcessor } diff --git a/typedapi/types/uppercasetokenfilter.go b/typedapi/types/uppercasetokenfilter.go index 07d4094709..155c763bf4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // UppercaseTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L341-L343 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/token_filters.ts#L447-L449 type UppercaseTokenFilter struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -86,8 +86,6 @@ func NewUppercaseTokenFilter() *UppercaseTokenFilter { return r } -// true - type UppercaseTokenFilterVariant interface { UppercaseTokenFilterCaster() *UppercaseTokenFilter } @@ -95,3 +93,8 @@ type UppercaseTokenFilterVariant interface { func (s *UppercaseTokenFilter) UppercaseTokenFilterCaster() *UppercaseTokenFilter { return s } + +func (s *UppercaseTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/uripartsprocessor.go b/typedapi/types/uripartsprocessor.go index a4ad055958..87e7c5456d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UriPartsProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1598-L1624 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1598-L1624 type UriPartsProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -187,8 +187,6 @@ func NewUriPartsProcessor() *UriPartsProcessor { return r } -// true - type UriPartsProcessorVariant interface { UriPartsProcessorCaster() *UriPartsProcessor } diff --git a/typedapi/types/urldecodeprocessor.go b/typedapi/types/urldecodeprocessor.go index d5ae625be1..04fb4294cb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UrlDecodeProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L1580-L1596 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L1580-L1596 type UrlDecodeProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -154,8 +154,6 @@ func NewUrlDecodeProcessor() *UrlDecodeProcessor { return r } -// true - type UrlDecodeProcessorVariant interface { UrlDecodeProcessorCaster() *UrlDecodeProcessor } diff --git a/typedapi/types/usagephase.go b/typedapi/types/usagephase.go index 7d8b7b76f1..325ba87323 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // UsagePhase type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L154-L157 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 a6ed3e320d..2e8a9cc21b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // UsagePhases type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L159-L165 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 5397db3a95..820ab35cd1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // UsageStatsIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L42-L44 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L42-L44 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 ca9b8f0cbc..442817644b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UsageStatsShards type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L46-L51 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/indices/field_usage_stats/IndicesFieldUsageStatsResponse.ts#L46-L51 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 fa6bdf93fe..ef6a8dec2c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // User type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/User.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e920c33d90..d3f6a9844e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // UserAgentProcessor type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Processors.ts#L515-L546 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ingest/_types/Processors.ts#L515-L546 type UserAgentProcessor struct { // Description Description of the processor. // Useful for describing the purpose of the processor or its configuration. @@ -196,8 +196,6 @@ func NewUserAgentProcessor() *UserAgentProcessor { return r } -// true - type UserAgentProcessorVariant interface { UserAgentProcessorCaster() *UserAgentProcessor } diff --git a/typedapi/types/userindicesprivileges.go b/typedapi/types/userindicesprivileges.go index 0749659a05..9ac51970b6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // UserIndicesPrivileges type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/Privileges.ts#L294-L316 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/security/_types/Privileges.ts#L294-L316 type UserIndicesPrivileges struct { // AllowRestrictedIndices Set to `true` if using wildcard or regular expressions for patterns that // cover restricted indices. Implicitly, restricted indices have limited @@ -170,5 +170,3 @@ func NewUserIndicesPrivileges() *UserIndicesPrivileges { return r } - -// false diff --git a/typedapi/types/userprofile.go b/typedapi/types/userprofile.go index 08984db269..f30b915035 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UserProfile type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/UserProfile.ts#L41-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 eca6c57533..7e875a578b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UserProfileHitMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/UserProfile.ts#L27-L30 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f0e6a7c322..c367e98786 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UserProfileUser type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/UserProfile.ts#L32-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 478021154b..12d49b08e9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UserProfileWithMetadata type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/_types/UserProfile.ts#L49-L52 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 050b8f1fd7..072b763916 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // UserQueryContainer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/query_user/types.ts#L37-L101 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -221,8 +221,6 @@ func NewUserQueryContainer() *UserQueryContainer { return r } -// true - type UserQueryContainerVariant interface { UserQueryContainerCaster() *UserQueryContainer } diff --git a/typedapi/types/userrealm.go b/typedapi/types/userrealm.go index 266656e52b..745626b2c7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // UserRealm type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/security/get_token/types.ts#L50-L53 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 34644a2830..44c7c54806 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -28,7 +28,7 @@ package types // IncludedInValidation // RegexValidation // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/connector/_types/Connector.ts#L50-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/connector/_types/Connector.ts#L50-L56 type Validation any type ValidationVariant interface { diff --git a/typedapi/types/validationloss.go b/typedapi/types/validationloss.go index 0f58fbeacf..d9038eb7d2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ValidationLoss type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/DataframeAnalytics.ts#L571-L576 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 3ff2eec82d..f1e3c5e92d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ValueCountAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L231-L236 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 56332bb5ea..2fa40ce73c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ValueCountAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L434-L434 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L457-L457 type ValueCountAggregation struct { // Field The field on which to run the aggregation. Field *string `json:"field,omitempty"` @@ -96,8 +96,6 @@ func NewValueCountAggregation() *ValueCountAggregation { return r } -// true - type ValueCountAggregationVariant interface { ValueCountAggregationCaster() *ValueCountAggregation } diff --git a/typedapi/types/variablewidthhistogramaggregate.go b/typedapi/types/variablewidthhistogramaggregate.go index 975d9bb2c0..f91d679e5d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // VariableWidthHistogramAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L402-L404 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 fb9f2b1c20..178bf05a11 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // VariableWidthHistogramAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/bucket.ts#L1091-L1115 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/bucket.ts#L1091-L1115 type VariableWidthHistogramAggregation struct { // Buckets The target number of buckets. Buckets *int `json:"buckets,omitempty"` @@ -133,8 +133,6 @@ func NewVariableWidthHistogramAggregation() *VariableWidthHistogramAggregation { return r } -// true - type VariableWidthHistogramAggregationVariant interface { VariableWidthHistogramAggregationCaster() *VariableWidthHistogramAggregation } diff --git a/typedapi/types/variablewidthhistogrambucket.go b/typedapi/types/variablewidthhistogrambucket.go index e4fa4f24cb..22ba62f690 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // VariableWidthHistogramBucket type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L406-L413 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 89f47f7a42..d489021008 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Vector type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L460-L464 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L460-L464 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 52a107b7b2..e099b5e29d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // VerifyIndex type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/indices/recovery/types.ts#L111-L116 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e2f3b6bc1f..aa5011b890 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // VersionProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L322-L324 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L340-L342 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 { @@ -846,8 +858,6 @@ func NewVersionProperty() *VersionProperty { return r } -// true - type VersionPropertyVariant interface { VersionPropertyCaster() *VersionProperty } @@ -855,3 +865,8 @@ type VersionPropertyVariant interface { func (s *VersionProperty) VersionPropertyCaster() *VersionProperty { return s } + +func (s *VersionProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/vertex.go b/typedapi/types/vertex.go index b3805cf980..9896ce6908 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Vertex type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/graph/_types/Vertex.ts#L23-L28 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 f02aeeba1d..1263333948 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // VertexDefinition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/graph/_types/Vertex.ts#L30-L59 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -139,8 +139,6 @@ func NewVertexDefinition() *VertexDefinition { return r } -// true - type VertexDefinitionVariant interface { VertexDefinitionCaster() *VertexDefinition } diff --git a/typedapi/types/vertexinclude.go b/typedapi/types/vertexinclude.go index 3ef803cb3b..4a0e85404e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // VertexInclude type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/graph/_types/Vertex.ts#L61-L65 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/graph/_types/Vertex.ts#L61-L65 type VertexInclude struct { Boost *Float64 `json:"boost,omitempty"` Term string `json:"term"` @@ -104,8 +104,6 @@ func NewVertexInclude() *VertexInclude { return r } -// true - type VertexIncludeVariant interface { VertexIncludeCaster() *VertexInclude } diff --git a/typedapi/types/vocabulary.go b/typedapi/types/vocabulary.go index cbd13c0f68..73a5416ccc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Vocabulary type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L248-L250 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L248-L250 type Vocabulary struct { Index string `json:"index"` } @@ -67,8 +67,6 @@ func NewVocabulary() *Vocabulary { return r } -// true - type VocabularyVariant interface { VocabularyCaster() *Vocabulary } diff --git a/typedapi/types/voyageaiservicesettings.go b/typedapi/types/voyageaiservicesettings.go index 02088fee0e..03ae27ed4e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // VoyageAIServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1075-L1106 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -132,8 +132,6 @@ func NewVoyageAIServiceSettings() *VoyageAIServiceSettings { return r } -// true - type VoyageAIServiceSettingsVariant interface { VoyageAIServiceSettingsCaster() *VoyageAIServiceSettings } diff --git a/typedapi/types/voyageaitasksettings.go b/typedapi/types/voyageaitasksettings.go index d6bb1cea35..0dad0b6ae5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // VoyageAITaskSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1108-L1132 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 @@ -132,8 +132,6 @@ func NewVoyageAITaskSettings() *VoyageAITaskSettings { return r } -// true - type VoyageAITaskSettingsVariant interface { VoyageAITaskSettingsCaster() *VoyageAITaskSettings } diff --git a/typedapi/types/waitforactiveshards.go b/typedapi/types/waitforactiveshards.go index d986fbe08f..108b43f53e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // int // waitforactiveshardoptions.WaitForActiveShardOptions // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/common.ts#L139-L140 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/common.ts#L139-L140 type WaitForActiveShards any diff --git a/typedapi/types/waitfornodes.go b/typedapi/types/waitfornodes.go index fa29b83e28..7313af97f9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -25,5 +25,5 @@ package types // string // int // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/cluster/health/types.ts#L47-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/cluster/health/types.ts#L47-L47 type WaitForNodes any diff --git a/typedapi/types/waitforsnapshotaction.go b/typedapi/types/waitforsnapshotaction.go index 75223aa38b..2551643c7f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WaitForSnapshotAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ilm/_types/Phase.ts#L145-L147 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ilm/_types/Phase.ts#L145-L147 type WaitForSnapshotAction struct { Policy string `json:"policy"` } @@ -75,8 +75,6 @@ func NewWaitForSnapshotAction() *WaitForSnapshotAction { return r } -// true - type WaitForSnapshotActionVariant interface { WaitForSnapshotActionCaster() *WaitForSnapshotAction } diff --git a/typedapi/types/warmerstats.go b/typedapi/types/warmerstats.go index 7924981b4a..ad934bc44b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WarmerStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Stats.ts#L412-L417 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Stats.ts#L437-L442 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 f980ff2377..462bf9d223 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // Watch type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Watch.ts#L37-L47 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Watch.ts#L37-L47 type Watch struct { Actions map[string]WatcherAction `json:"actions"` Condition WatcherCondition `json:"condition"` @@ -120,8 +120,6 @@ func NewWatch() *Watch { return r } -// true - type WatchVariant interface { WatchCaster() *Watch } diff --git a/typedapi/types/watcher.go b/typedapi/types/watcher.go index c16623896d..6473a37464 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Watcher type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L466-L470 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L466-L470 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 26e5ce8f06..d9dd0416a3 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // WatcherAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Action.ts#L35-L54 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L35-L54 type WatcherAction struct { ActionType *actiontype.ActionType `json:"action_type,omitempty"` Condition *WatcherCondition `json:"condition,omitempty"` @@ -166,8 +166,6 @@ func NewWatcherAction() *WatcherAction { return r } -// true - type WatcherActionVariant interface { WatcherActionCaster() *WatcherAction } diff --git a/typedapi/types/watcheractions.go b/typedapi/types/watcheractions.go index dbdf130189..2476f9c868 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // WatcherActions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L402-L404 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L402-L404 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 c05c92e26f..1bcc052701 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // WatcherActionTotals type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L418-L421 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L418-L421 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 69a14d1c08..a75c1301ca 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -29,7 +29,7 @@ import ( // WatcherCondition type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Conditions.ts#L51-L63 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Conditions.ts#L51-L63 type WatcherCondition struct { AdditionalWatcherConditionProperty map[string]json.RawMessage `json:"-"` Always *AlwaysCondition `json:"always,omitempty"` @@ -79,8 +79,6 @@ func NewWatcherCondition() *WatcherCondition { return r } -// true - type WatcherConditionVariant interface { WatcherConditionCaster() *WatcherCondition } diff --git a/typedapi/types/watcherinput.go b/typedapi/types/watcherinput.go index db221c7a2c..e07ef45b98 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -27,7 +27,7 @@ import ( // WatcherInput type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Input.ts#L90-L98 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Input.ts#L87-L95 type WatcherInput struct { AdditionalWatcherInputProperty map[string]json.RawMessage `json:"-"` Chain *ChainInput `json:"chain,omitempty"` @@ -75,8 +75,6 @@ func NewWatcherInput() *WatcherInput { return r } -// true - type WatcherInputVariant interface { WatcherInputCaster() *WatcherInput } diff --git a/typedapi/types/watchernodestats.go b/typedapi/types/watchernodestats.go index 5031380033..2d455421ec 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // WatcherNodeStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/stats/types.ts#L33-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c45bde57f5..0329a73a67 100644 --- a/typedapi/types/watcherstatusactions.go +++ b/typedapi/types/watcherstatusactions.go @@ -16,13 +16,13 @@ // under the License. // Code generated from the elasticsearch-specification DO NOT EDIT. -// https://github.com/elastic/elasticsearch-specification/tree/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // WatcherStatusActions type alias. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Action.ts#L56-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Action.ts#L56-L56 type WatcherStatusActions map[string]ActionStatus type WatcherStatusActionsVariant interface { diff --git a/typedapi/types/watcherwatch.go b/typedapi/types/watcherwatch.go index d23f6198f9..e363a228e7 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // WatcherWatch type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L406-L411 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L406-L411 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 1aeac7732a..ade8509688 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // WatcherWatchTrigger type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L413-L416 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L413-L416 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 d1ded1aaa0..de60cd0553 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WatcherWatchTriggerSchedule type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L472-L475 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L472-L475 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 5557da2196..c0009eac9a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // WatchRecord type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/execute_watch/types.ts#L27-L39 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 82cc241bdf..c84beabcbc 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // WatchRecordQueuedStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/stats/types.ts#L71-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 24cd1b7221..d7559bf816 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -32,7 +32,7 @@ import ( // WatchRecordStats type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/stats/types.ts#L79-L94 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 9772a7076a..49a5b56499 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WatchStatus type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Watch.ts#L49-L56 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Watch.ts#L49-L56 type WatchStatus struct { Actions WatcherStatusActions `json:"actions"` ExecutionState *string `json:"execution_state,omitempty"` @@ -105,8 +105,6 @@ func NewWatchStatus() *WatchStatus { return r } -// true - type WatchStatusVariant interface { WatchStatusCaster() *WatchStatus } diff --git a/typedapi/types/watsonxservicesettings.go b/typedapi/types/watsonxservicesettings.go index 60b75e38a2..6773292314 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WatsonxServiceSettings type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/inference/_types/CommonTypes.ts#L1143-L1180 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/inference/_types/CommonTypes.ts#L1684-L1722 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 @@ -50,6 +50,7 @@ type WatsonxServiceSettings struct { // ModelId The name of the model to use for the inference task. // Refer to the IBM Embedding Models section in the Watsonx documentation for // the list of available text embedding models. + // Refer to the IBM library - Foundation models in Watsonx.ai. ModelId string `json:"model_id"` // ProjectId The identifier of the IBM Cloud project to use for the inference task. ProjectId string `json:"project_id"` @@ -154,8 +155,6 @@ func NewWatsonxServiceSettings() *WatsonxServiceSettings { return r } -// true - type WatsonxServiceSettingsVariant interface { WatsonxServiceSettingsCaster() *WatsonxServiceSettings } diff --git a/typedapi/types/web.go b/typedapi/types/web.go index 13deabe093..f42d8a9edf 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // Web type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ingest/_types/Database.ts#L61-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 dad6f00bfd..ddab437e0e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // WebhookAction type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L293-L293 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/_types/Actions.ts#L293-L293 type WebhookAction struct { Auth *HttpInputAuthentication `json:"auth,omitempty"` Body *string `json:"body,omitempty"` @@ -173,8 +173,6 @@ func NewWebhookAction() *WebhookAction { return r } -// true - type WebhookActionVariant interface { WebhookActionCaster() *WebhookAction } diff --git a/typedapi/types/webhookresult.go b/typedapi/types/webhookresult.go index 57f9f224ec..5c8e030e5e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // WebhookResult type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/_types/Actions.ts#L295-L298 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d936ec00a2..f1c22e0c8b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // WeightedAverageAggregation type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L449-L463 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/aggregations/metric.ts#L472-L486 type WeightedAverageAggregation struct { // Format A numeric response formatter. Format *string `json:"format,omitempty"` @@ -98,8 +98,6 @@ func NewWeightedAverageAggregation() *WeightedAverageAggregation { return r } -// true - type WeightedAverageAggregationVariant interface { WeightedAverageAggregationCaster() *WeightedAverageAggregation } diff --git a/typedapi/types/weightedaveragevalue.go b/typedapi/types/weightedaveragevalue.go index b0d1776e0c..0cf1994100 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WeightedAverageValue type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/metric.ts#L465-L475 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -93,8 +93,6 @@ func NewWeightedAverageValue() *WeightedAverageValue { return r } -// true - type WeightedAverageValueVariant interface { WeightedAverageValueCaster() *WeightedAverageValue } diff --git a/typedapi/types/weightedavgaggregate.go b/typedapi/types/weightedavgaggregate.go index cdaa382ce1..aa43b2b09b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WeightedAvgAggregate type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/aggregations/Aggregate.ts#L224-L229 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e26f5aeca2..d5b42d5918 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WeightedTokensQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/WeightedTokensQuery.ts#L25-L33 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -43,7 +43,7 @@ type WeightedTokensQuery struct { PruningConfig *TokenPruningConfig `json:"pruning_config,omitempty"` QueryName_ *string `json:"_name,omitempty"` // Tokens The tokens representing this query - Tokens map[string]float32 `json:"tokens"` + Tokens []map[string]float32 `json:"tokens"` } func (s *WeightedTokensQuery) UnmarshalJSON(data []byte) error { @@ -95,11 +95,24 @@ func (s *WeightedTokensQuery) UnmarshalJSON(data []byte) error { s.QueryName_ = &o case "tokens": - if s.Tokens == nil { - s.Tokens = make(map[string]float32, 0) - } - if err := dec.Decode(&s.Tokens); err != nil { - return fmt.Errorf("%s | %w", "Tokens", err) + + rawMsg := json.RawMessage{} + dec.Decode(&rawMsg) + source := bytes.NewReader(rawMsg) + localDec := json.NewDecoder(source) + switch rawMsg[0] { + case '{': + o := make(map[string]float32, 0) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Tokens", err) + } + s.Tokens = append(s.Tokens, o) + case '[': + o := make([]map[string]float32, 0) + if err := localDec.Decode(&o); err != nil { + return fmt.Errorf("%s | %w", "Tokens", err) + } + s.Tokens = o } } @@ -109,15 +122,11 @@ func (s *WeightedTokensQuery) UnmarshalJSON(data []byte) error { // NewWeightedTokensQuery returns a WeightedTokensQuery. func NewWeightedTokensQuery() *WeightedTokensQuery { - r := &WeightedTokensQuery{ - Tokens: make(map[string]float32), - } + r := &WeightedTokensQuery{} return r } -// true - type WeightedTokensQueryVariant interface { WeightedTokensQueryCaster() *WeightedTokensQuery } diff --git a/typedapi/types/weights.go b/typedapi/types/weights.go index 8c82786f45..9a7c3d330e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // Weights type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/put_trained_model/types.ts#L108-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/put_trained_model/types.ts#L108-L110 type Weights struct { Weights Float64 `json:"weights"` } @@ -79,8 +79,6 @@ func NewWeights() *Weights { return r } -// true - type WeightsVariant interface { WeightsCaster() *Weights } diff --git a/typedapi/types/whitespaceanalyzer.go b/typedapi/types/whitespaceanalyzer.go index 31d1c49ba0..5ceb7c8c50 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -30,7 +30,7 @@ import ( // WhitespaceAnalyzer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/analyzers.ts#L421-L425 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/analyzers.ts#L421-L425 type WhitespaceAnalyzer struct { Type string `json:"type,omitempty"` Version *string `json:"version,omitempty"` @@ -86,8 +86,6 @@ func NewWhitespaceAnalyzer() *WhitespaceAnalyzer { return r } -// true - type WhitespaceAnalyzerVariant interface { WhitespaceAnalyzerCaster() *WhitespaceAnalyzer } @@ -95,3 +93,8 @@ type WhitespaceAnalyzerVariant interface { func (s *WhitespaceAnalyzer) WhitespaceAnalyzerCaster() *WhitespaceAnalyzer { return s } + +func (s *WhitespaceAnalyzer) AnalyzerCaster() *Analyzer { + o := Analyzer(s) + return &o +} diff --git a/typedapi/types/whitespacetokenizer.go b/typedapi/types/whitespacetokenizer.go index e9fdbfbee5..9ee4e021ab 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WhitespaceTokenizer type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/tokenizers.ts#L135-L138 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/analysis/tokenizers.ts#L137-L140 type WhitespaceTokenizer struct { MaxTokenLength *int `json:"max_token_length,omitempty"` Type string `json:"type,omitempty"` @@ -105,8 +105,6 @@ func NewWhitespaceTokenizer() *WhitespaceTokenizer { return r } -// true - type WhitespaceTokenizerVariant interface { WhitespaceTokenizerCaster() *WhitespaceTokenizer } @@ -114,3 +112,8 @@ type WhitespaceTokenizerVariant interface { func (s *WhitespaceTokenizer) WhitespaceTokenizerCaster() *WhitespaceTokenizer { return s } + +func (s *WhitespaceTokenizer) TokenizerDefinitionCaster() *TokenizerDefinition { + o := TokenizerDefinition(s) + return &o +} diff --git a/typedapi/types/wildcardproperty.go b/typedapi/types/wildcardproperty.go index bf492258c0..aceb1e5bda 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -34,7 +34,7 @@ import ( // WildcardProperty type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/mapping/core.ts#L326-L333 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/mapping/core.ts#L344-L351 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 { @@ -860,8 +872,6 @@ func NewWildcardProperty() *WildcardProperty { return r } -// true - type WildcardPropertyVariant interface { WildcardPropertyCaster() *WildcardProperty } @@ -869,3 +879,8 @@ type WildcardPropertyVariant interface { func (s *WildcardProperty) WildcardPropertyCaster() *WildcardProperty { return s } + +func (s *WildcardProperty) PropertyCaster() *Property { + o := Property(s) + return &o +} diff --git a/typedapi/types/wildcardquery.go b/typedapi/types/wildcardquery.go index 84b21de039..cbedbac5fa 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WildcardQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/term.ts#L305-L325 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/query_dsl/term.ts#L301-L321 type WildcardQuery struct { // Boost Floating point number used to decrease or increase the relevance scores of // the query. @@ -164,8 +164,6 @@ func NewWildcardQuery() *WildcardQuery { return r } -// true - type WildcardQueryVariant interface { WildcardQueryCaster() *WildcardQuery } diff --git a/typedapi/types/wktgeobounds.go b/typedapi/types/wktgeobounds.go index cb046ffd99..c93067ecf1 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WktGeoBounds type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/Geo.ts#L150-L152 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/_types/Geo.ts#L150-L152 type WktGeoBounds struct { Wkt string `json:"wkt"` } @@ -75,8 +75,6 @@ func NewWktGeoBounds() *WktGeoBounds { return r } -// true - type WktGeoBoundsVariant interface { WktGeoBoundsCaster() *WktGeoBounds } @@ -84,3 +82,8 @@ type WktGeoBoundsVariant interface { func (s *WktGeoBounds) WktGeoBoundsCaster() *WktGeoBounds { return s } + +func (s *WktGeoBounds) GeoBoundsCaster() *GeoBounds { + o := GeoBounds(s) + return &o +} diff --git a/typedapi/types/worddelimitergraphtokenfilter.go b/typedapi/types/worddelimitergraphtokenfilter.go index 090ef14f3d..1ea473dd71 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,25 +31,61 @@ import ( // WordDelimiterGraphTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L150-L167 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -296,8 +332,6 @@ func NewWordDelimiterGraphTokenFilter() *WordDelimiterGraphTokenFilter { return r } -// true - type WordDelimiterGraphTokenFilterVariant interface { WordDelimiterGraphTokenFilterCaster() *WordDelimiterGraphTokenFilter } @@ -305,3 +339,8 @@ type WordDelimiterGraphTokenFilterVariant interface { func (s *WordDelimiterGraphTokenFilter) WordDelimiterGraphTokenFilterCaster() *WordDelimiterGraphTokenFilter { return s } + +func (s *WordDelimiterGraphTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/worddelimitertokenfilter.go b/typedapi/types/worddelimitertokenfilter.go index 89e9159609..0e91a0d953 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,23 +31,55 @@ import ( // WordDelimiterTokenFilter type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/analysis/token_filters.ts#L133-L148 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 { @@ -264,8 +296,6 @@ func NewWordDelimiterTokenFilter() *WordDelimiterTokenFilter { return r } -// true - type WordDelimiterTokenFilterVariant interface { WordDelimiterTokenFilterCaster() *WordDelimiterTokenFilter } @@ -273,3 +303,8 @@ type WordDelimiterTokenFilterVariant interface { func (s *WordDelimiterTokenFilter) WordDelimiterTokenFilterCaster() *WordDelimiterTokenFilter { return s } + +func (s *WordDelimiterTokenFilter) TokenFilterDefinitionCaster() *TokenFilterDefinition { + o := TokenFilterDefinition(s) + return &o +} diff --git a/typedapi/types/wrapperquery.go b/typedapi/types/wrapperquery.go index 7a4a47a43c..09f340640a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WrapperQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/_types/query_dsl/abstractions.ts#L508-L517 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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. @@ -112,8 +112,6 @@ func NewWrapperQuery() *WrapperQuery { return r } -// true - type WrapperQueryVariant interface { WrapperQueryCaster() *WrapperQuery } diff --git a/typedapi/types/writeresponsebase.go b/typedapi/types/writeresponsebase.go new file mode 100644 index 0000000000..8fe06acb6f --- /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/907d11a72a6bfd37b777d526880c56202889609e + +package types + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "io" + "strconv" + + "github.com/elastic/go-elasticsearch/v9/typedapi/types/enums/result" +) + +// WriteResponseBase type. +// +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8ddcc27af6..e674f70c4b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // WriteSummaryInfo type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/snapshot/repository_analyze/SnapshotAnalyzeRepositoryResponse.ts#L162-L191 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 56ab3a3a2e..2c4092a2b9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -33,7 +33,7 @@ import ( // XlmRobertaTokenizationConfig type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L200-L200 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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"` @@ -141,8 +141,6 @@ func NewXlmRobertaTokenizationConfig() *XlmRobertaTokenizationConfig { return r } -// true - type XlmRobertaTokenizationConfigVariant interface { XlmRobertaTokenizationConfigCaster() *XlmRobertaTokenizationConfig } diff --git a/typedapi/types/xpackdatafeed.go b/typedapi/types/xpackdatafeed.go index 05de6b983a..7343c9b1a0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // XpackDatafeed type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L74-L76 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 da9fbefc03..bf959f9659 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // XpackFeature type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/info/types.ts#L84-L89 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/info/types.ts#L84-L89 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 225878ccb2..63addcee2a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types // XpackFeatures type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/info/types.ts#L42-L82 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/info/types.ts#L42-L82 type XpackFeatures struct { AggregateMetric XpackFeature `json:"aggregate_metric"` Analytics XpackFeature `json:"analytics"` @@ -59,5 +59,3 @@ func NewXpackFeatures() *XpackFeatures { return r } - -// false diff --git a/typedapi/types/xpackquery.go b/typedapi/types/xpackquery.go index 553993b34b..6ec01335db 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // XpackQuery type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L269-L274 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bf40c7a62d..fa878e7f53 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // XpackRealm type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L423-L432 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/types.ts#L423-L432 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 0a4d4cd54d..f377172e21 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // XpackRoleMapping type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L280-L283 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c9a724701c..abeeed80c6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // XpackRuntimeFieldTypes type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/types.ts#L285-L287 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 c5800c353b..6ca3e3d819 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ZeroShotClassificationInferenceOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L216-L237 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L216-L237 type ZeroShotClassificationInferenceOptions struct { // ClassificationLabels The zero shot classification labels indicating entailment, neutral, and // contradiction @@ -130,8 +130,6 @@ func NewZeroShotClassificationInferenceOptions() *ZeroShotClassificationInferenc return r } -// true - type ZeroShotClassificationInferenceOptionsVariant interface { ZeroShotClassificationInferenceOptionsCaster() *ZeroShotClassificationInferenceOptions } diff --git a/typedapi/types/zeroshotclassificationinferenceupdateoptions.go b/typedapi/types/zeroshotclassificationinferenceupdateoptions.go index f474c50643..d9d934dc9b 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package types @@ -31,7 +31,7 @@ import ( // ZeroShotClassificationInferenceUpdateOptions type. // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/ml/_types/inference.ts#L393-L402 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/ml/_types/inference.ts#L393-L402 type ZeroShotClassificationInferenceUpdateOptions struct { // Labels The labels to predict. Labels []string `json:"labels"` @@ -108,8 +108,6 @@ func NewZeroShotClassificationInferenceUpdateOptions() *ZeroShotClassificationIn return r } -// true - type ZeroShotClassificationInferenceUpdateOptionsVariant interface { ZeroShotClassificationInferenceUpdateOptionsCaster() *ZeroShotClassificationInferenceUpdateOptions } diff --git a/typedapi/watcher/ackwatch/ack_watch.go b/typedapi/watcher/ackwatch/ack_watch.go index 54e247726f..ba88dab782 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Acknowledge a watch. // Acknowledging a watch enables you to manually throttle the execution of the @@ -34,6 +34,8 @@ // `ack.state` is reset to `awaits_successful_execution`. // This happens when the condition of the watch is not met (the condition // evaluates to false). +// To demonstrate how throttling works in practice and how it can be configured +// for individual actions within a watch, refer to External documentation. package ackwatch import ( @@ -110,6 +112,8 @@ func NewAckWatchFunc(tp elastictransport.Interface) NewAckWatch { // `ack.state` is reset to `awaits_successful_execution`. // This happens when the condition of the watch is not met (the condition // evaluates to false). +// To demonstrate how throttling works in practice and how it can be configured +// for individual actions within a watch, refer to External documentation. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-ack-watch func New(tp elastictransport.Interface) *AckWatch { @@ -389,7 +393,7 @@ func (r *AckWatch) FilterPath(filterpaths ...string) *AckWatch { // 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 +// `"exists_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. diff --git a/typedapi/watcher/ackwatch/response.go b/typedapi/watcher/ackwatch/response.go index d819dbe088..a15e981d22 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package ackwatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package ackwatch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/ack_watch/WatcherAckWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 24cfd9794a..29e0a4bfd4 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Activate a watch. // A watch can be either active or inactive. @@ -327,7 +327,7 @@ func (r *ActivateWatch) FilterPath(filterpaths ...string) *ActivateWatch { // 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 +// `"exists_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. diff --git a/typedapi/watcher/activatewatch/response.go b/typedapi/watcher/activatewatch/response.go index 214ead4023..0807f10412 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package activatewatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package activatewatch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/activate_watch/WatcherActivateWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e4754b4508..dcb9030da6 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Deactivate a watch. // A watch can be either active or inactive. @@ -327,7 +327,7 @@ func (r *DeactivateWatch) FilterPath(filterpaths ...string) *DeactivateWatch { // 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 +// `"exists_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. diff --git a/typedapi/watcher/deactivatewatch/response.go b/typedapi/watcher/deactivatewatch/response.go index 0146310ae9..16b2efd3c2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deactivatewatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package deactivatewatch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/deactivate_watch/DeactivateWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 8bc8e212d1..e7577d353f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Delete a watch. // When the watch is removed, the document representing the watch in the @@ -345,7 +345,7 @@ func (r *DeleteWatch) FilterPath(filterpaths ...string) *DeleteWatch { // 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 +// `"exists_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. diff --git a/typedapi/watcher/deletewatch/response.go b/typedapi/watcher/deletewatch/response.go index bb1fa2d17a..dd46c8e3a5 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package deletewatch // Response holds the response body struct for the package deletewatch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/delete_watch/DeleteWatchResponse.ts#L22-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 b267feaa8a..cca08d28e0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Run a watch. // This API can be used to force execution of the watch outside of its @@ -42,6 +42,8 @@ // 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. +// Refer to the external documentation for examples of watch execution requests, +// including existing, customized, and inline watches. package executewatch import ( @@ -127,6 +129,8 @@ func NewExecuteWatchFunc(tp elastictransport.Interface) NewExecuteWatch { // 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. +// Refer to the external documentation for examples of watch execution requests, +// including existing, customized, and inline watches. // // https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-watcher-execute-watch func New(tp elastictransport.Interface) *ExecuteWatch { @@ -401,7 +405,7 @@ func (r *ExecuteWatch) FilterPath(filterpaths ...string) *ExecuteWatch { // 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 +// `"exists_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. diff --git a/typedapi/watcher/executewatch/request.go b/typedapi/watcher/executewatch/request.go index 37a2d4a0a1..0461baf0c2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package executewatch @@ -30,7 +30,7 @@ import ( // Request holds the request body struct for the package executewatch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/execute_watch/WatcherExecuteWatchRequest.ts#L28-L105 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/execute_watch/WatcherExecuteWatchRequest.ts#L28-L107 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 56acb3e822..c27f0a5d49 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package executewatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package executewatch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/execute_watch/WatcherExecuteWatchResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 54832b0238..459849f353 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get Watcher index settings. // Get settings for the Watcher internal index (`.watches`). @@ -322,7 +322,7 @@ func (r *GetSettings) FilterPath(filterpaths ...string) *GetSettings { // 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 +// `"exists_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. diff --git a/typedapi/watcher/getsettings/response.go b/typedapi/watcher/getsettings/response.go index 54bd1640f9..2e787cf6cd 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getsettings @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getsettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/get_settings/WatcherGetSettingsResponse.ts#L22-L26 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 bfb5b5b22c..22da956dad 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get a watch. package getwatch @@ -323,7 +323,7 @@ func (r *GetWatch) FilterPath(filterpaths ...string) *GetWatch { // 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 +// `"exists_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. diff --git a/typedapi/watcher/getwatch/response.go b/typedapi/watcher/getwatch/response.go index c8c3bde7b4..813ec4c2df 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package getwatch @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package getwatch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/get_watch/GetWatchResponse.ts#L24-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 063e411ee4..309f97cf4e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Create or update a watch. // When a watch is registered, a new document that represents the watch is added @@ -410,7 +410,7 @@ func (r *PutWatch) FilterPath(filterpaths ...string) *PutWatch { // 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 +// `"exists_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. diff --git a/typedapi/watcher/putwatch/request.go b/typedapi/watcher/putwatch/request.go index b270e5cdd8..f20526e544 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putwatch @@ -32,7 +32,7 @@ import ( // Request holds the request body struct for the package putwatch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/put_watch/WatcherPutWatchRequest.ts#L31-L110 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 e2820ca6f9..2943ac5bd2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package putwatch // Response holds the response body struct for the package putwatch // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/put_watch/WatcherPutWatchResponse.ts#L23-L31 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 d529aca88b..4db81cc905 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Query watches. // Get all registered watches in a paginated manner and optionally filter @@ -324,7 +324,7 @@ func (r *QueryWatches) FilterPath(filterpaths ...string) *QueryWatches { // 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 +// `"exists_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. diff --git a/typedapi/watcher/querywatches/request.go b/typedapi/watcher/querywatches/request.go index f37377f628..dd063ce337 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package querywatches @@ -33,7 +33,7 @@ import ( // Request holds the request body struct for the package querywatches // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/query_watches/WatcherQueryWatchesRequest.ts#L25-L70 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 4fbae6133a..699cd30d4a 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package querywatches @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package querywatches // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/query_watches/WatcherQueryWatchesResponse.ts#L23-L34 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6668e89a47..10c67de582 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package start // Response holds the response body struct for the package start // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/start/WatcherStartResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/start/WatcherStartResponse.ts#L22-L25 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 5a14129c0f..9cd6693800 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Start the watch service. // Start the Watcher service if it is not already running. @@ -310,7 +310,7 @@ func (r *Start) FilterPath(filterpaths ...string) *Start { // 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 +// `"exists_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. diff --git a/typedapi/watcher/stats/response.go b/typedapi/watcher/stats/response.go index 3c9646549c..bf0b594dda 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stats @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package stats // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/stats/WatcherStatsResponse.ts#L24-L32 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 1e0f54fb14..f3f705a07f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get Watcher statistics. // This API always returns basic metrics. @@ -340,7 +340,7 @@ func (r *Stats) FilterPath(filterpaths ...string) *Stats { // 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 +// `"exists_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. diff --git a/typedapi/watcher/stop/response.go b/typedapi/watcher/stop/response.go index 5f0ef064d8..0851367c1c 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package stop // Response holds the response body struct for the package stop // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/stop/WatcherStopResponse.ts#L22-L25 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/watcher/stop/WatcherStopResponse.ts#L22-L25 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 052ed6491d..f8886617d0 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Stop the watch service. // Stop the Watcher service if it is running. @@ -313,7 +313,7 @@ func (r *Stop) FilterPath(filterpaths ...string) *Stop { // 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 +// `"exists_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. diff --git a/typedapi/watcher/updatesettings/request.go b/typedapi/watcher/updatesettings/request.go index 4dd3b97f53..3aae9f298d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatesettings @@ -27,7 +27,7 @@ import ( // Request holds the request body struct for the package updatesettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/update_settings/WatcherUpdateSettingsRequest.ts#L24-L61 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 6eb1122c6c..6944453ca2 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package updatesettings // Response holds the response body struct for the package updatesettings // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/watcher/update_settings/WatcherUpdateSettingsResponse.ts#L20-L24 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 04b39b5fe5..7aeac2c4cb 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Update Watcher index settings. // Update settings for the Watcher internal index (`.watches`). @@ -352,7 +352,7 @@ func (r *UpdateSettings) FilterPath(filterpaths ...string) *UpdateSettings { // 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 +// `"exists_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. diff --git a/typedapi/xpack/info/info.go b/typedapi/xpack/info/info.go index ac669e5a6c..3950b96ee9 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get information. // The information provided by the API includes: diff --git a/typedapi/xpack/info/response.go b/typedapi/xpack/info/response.go index 32e9832754..ea19475c7d 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package info @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package info // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/info/XPackInfoResponse.ts#L22-L29 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/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 32322d86e1..b8f570981e 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e package usage @@ -26,7 +26,7 @@ import ( // Response holds the response body struct for the package usage // -// https://github.com/elastic/elasticsearch-specification/blob/cbfcc73d01310bed2a480ec35aaef98138b598e5/specification/xpack/usage/XPackUsageResponse.ts#L42-L77 +// https://github.com/elastic/elasticsearch-specification/blob/907d11a72a6bfd37b777d526880c56202889609e/specification/xpack/usage/XPackUsageResponse.ts#L42-L77 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 9ef65b5afd..2f69e5231f 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/cbfcc73d01310bed2a480ec35aaef98138b598e5 +// https://github.com/elastic/elasticsearch-specification/tree/907d11a72a6bfd37b777d526880c56202889609e // Get usage information. // Get information about the features that are currently enabled and available @@ -317,7 +317,7 @@ func (r *Usage) FilterPath(filterpaths ...string) *Usage { // 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 +// `"exists_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.